Esempio n. 1
0
 /// <summary>
 /// True: The convex side of the vector is inside the shape.
 /// This is determined by the direction of the vector.
 /// </summary>
 /// <param name="vector1"></param>
 /// <param name="vector2"></param>
 /// <param name="tolerance">Tolerance by which a double is considered to be zero or equal.</param>
 /// <returns></returns>
 public static bool IsConvexInside(this NVector vector1, NVector vector2, double tolerance = Num.ZeroTolerance)
 {
     return(vector1.Area(vector2).IsLessThan(0, tolerance));
 }
Esempio n. 2
0
 /// <summary>
 /// Returns the area between two vectors.
 /// </summary>
 /// <param name="vector"></param>
 /// <returns></returns>
 public double Area(NVector vector)
 {
     return(_vector.Area(vector));
 }