// �O��(outer product, cross product, vector product) : a �~ b �� |a||b|sin�� �� ax by - ay bx // zero if two vectors run parallelly public double CrossProduct(GPoint p) { return(X * p.Y - Y * p.X); }
public bool IsEqual(GPoint p) { return((Math.Abs(X - p.X) < Double.Epsilon) && (Math.Abs(Y - p.Y) < Double.Epsilon)); }
// ����(inner product, dot product, scalar product) : a�Eb �� |a||b|cos�� �� ax bx + ay by // zero if two vectors run orthogonally public double DotProduct(GPoint p) { return(X * p.X + Y * p.Y); }
public double Distance(GPoint p) { return((this - p).Length()); }