コード例 #1
0
        public Segment(Point p1, Point p2)
        {
            P1 = p1;
            P2 = p2;

            Distance = MathHelper.Distance(p1, p2);
            Angle    = MathHelper.Angle(P1, P2);
            var dx = p2.X - p1.X;
            var dy = p2.Y - p1.Y;

            Normal = new SVector();
        }
コード例 #2
0
 public double Cross(SVector v)
 {
     return(X * v.Y - Y * v.X);
 }