private int NormalizeY(float value) { float range2 = (float)(GPlotBitmap.Height / 2); value *= GPlotScale.Height; value = Math.Max(value, -range2); value = Math.Min(value, range2); return Convert.ToInt32(value + range2); }