Example #1
0
        public bool IsPointIn(Point2D p)
        {
            Triangle2 ta = new Triangle2(p, B, C);
            Triangle2 tb = new Triangle2(p, A, C);
            Triangle2 tc = new Triangle2(p, A, B);

            return(Math.Abs(ta.Area + tb.Area + tc.Area - Area) < 1e-6);
        }
Example #2
0
        public bool IsPointIn(Vector p)
        {
            var ta = new Triangle2(p, B, C);
            var tb = new Triangle2(p, A, C);
            var tc = new Triangle2(p, A, B);

            return(Math.Abs(ta.Area + tb.Area + tc.Area - Area) < 1e-6);
        }