コード例 #1
0
ファイル: Ray2D.cs プロジェクト: xuchuansheng/GenXSource
		public NuGenRay2D(NuGenPnt2D p, NuGenVec2D v)
		{
			this.p = p;
			this.v = v;
		}
コード例 #2
0
 public NuGenBox2D(NuGenPnt2D lower, NuGenPnt2D upper)
 {
     this.lower = lower;
     this.upper = upper;
 }
コード例 #3
0
 public bool IsOnBorder(NuGenPnt2D p)
 {
     return IsInsideOrOnBorder(p) && !IsInside(p);
 }
コード例 #4
0
 public bool IsInsideOrOnBorder(NuGenPnt2D p)
 {
     return lower <= p && upper >= p;
 }
コード例 #5
0
 public bool IsInside(NuGenPnt2D p)
 {
     return lower < p && upper > p;
 }
コード例 #6
0
ファイル: Vecmath.cs プロジェクト: xuchuansheng/GenXSource
		public static bool ApproxEquals(NuGenPnt2D a, NuGenPnt2D b)
		{
			return
				Math.Abs(a._x[0] - b._x[0]) < NuGenVector.TINY_DOUBLE &&
				Math.Abs(a._x[1] - b._x[1]) < NuGenVector.TINY_DOUBLE;
		}