Esempio n. 1
0
        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));
        }
Esempio n. 2
0
 public bool CheckLeftPoint(Vector2 point) => Line.Fn(point) < 0;
Esempio n. 3
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());
        }