Skip to content

Files

Latest commit

9f7fb47 · Apr 22, 2017

History

History
21 lines (17 loc) · 493 Bytes

File metadata and controls

21 lines (17 loc) · 493 Bytes



private Point CorrespondingPoint(Point pt)
{
    double xmin = 0;
    double xmax = 6.5;
    double ymin = -1.1;
    double ymax = 1.1;

    var result = new Point
    {
        X = (pt.X - xmin) * canvas.Width / (xmax - xmin),
        Y = canvas.Height - (pt.Y - ymin) * canvas.Height / (ymax - ymin)
    };
    return result;
}