public void FnTest() { Vector2 a = (1, 1); Vector2 b = (2, 3); Line2 l = (a, b); Assert.AreEqual(0, l.Fn(a)); Assert.AreEqual(0, l.Fn(b)); }
public bool CheckLeftPoint(Vector2 point) => Line.Fn(point) < 0;
public static Shape2 Mirror(this Shape2 shape, Line2 line) { var n = line.Normal; return(shape.Transform(p => p - 2 * line.Fn(p) * n / line.Normal.Len2).Reverse()); }