Created
July 31, 2020 12:57
-
-
Save pedoc/76ca34b78b21ed706a2d5c5d827bd99c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Func<float,float> Line(PointF a, PointF b) | |
{ | |
return x => | |
{ | |
var k = (b.Y - a.Y) / (b.X - a.X); | |
return k * (x - a.X) + a.Y; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment