예제 #1
0
 public static NuGenVec2D Max(NuGenVec2D a, NuGenVec2D b)
 {
     return(new NuGenVec2D(
                Math.Max(a._x[0], b._x[0]),
                Math.Max(a._x[1], b._x[1])
                ));
 }
예제 #2
0
        public override bool Equals(object obj)
        {
            NuGenVec2D x = (NuGenVec2D)obj;

            return(
                _x[0] == x._x[0] &&
                _x[1] == x._x[1]
                );
        }
예제 #3
0
		public NuGenNuGenScale2D(NuGenVec2D scale)
		{
			v = scale;
		}
예제 #4
0
		public NuGenNuGenScale2D(double x, double y)
		{
			v = new NuGenVec2D(x,y);
		}
예제 #5
0
 public NuGenNuGenScale2D(NuGenVec2D scale)
 {
     v = scale;
 }
예제 #6
0
 public static double Dot(NuGenVec2D u, NuGenVec2D v)
 {
     return(u[0] * v[0] + u[1] * v[1]);
 }
예제 #7
0
 public NuGenShift2D(NuGenVec2D shift)
 {
     v = shift;
 }
예제 #8
0
		public NuGenShift2D(NuGenVec2D shift)
		{
			v = shift;
		}
예제 #9
0
		public static NuGenVec2D Max(NuGenVec2D a, NuGenVec2D b)
		{
			return new NuGenVec2D(
				Math.Max(a._x[0], b._x[0]),
				Math.Max(a._x[1], b._x[1])
				);
		}
예제 #10
0
 public NuGenShift2D(double x, double y)
 {
     v = new NuGenVec2D(x, y);
 }
예제 #11
0
		public static double Dot(NuGenVec2D u, NuGenVec2D v)
		{
			return u[0] * v[0] + u[1] * v[1];
		}
예제 #12
0
		public static bool ApproxEquals(NuGenVec2D a, NuGenVec2D b)
		{
			return
				Math.Abs(a._x[0] - b._x[0]) < NuGenVector.TINY_DOUBLE &&
				Math.Abs(a._x[1] - b._x[1]) < NuGenVector.TINY_DOUBLE;
		}
예제 #13
0
 public static bool ApproxEquals(NuGenVec2D a, NuGenVec2D b)
 {
     return
         (Math.Abs(a._x[0] - b._x[0]) < NuGenVector.TINY_DOUBLE &&
          Math.Abs(a._x[1] - b._x[1]) < NuGenVector.TINY_DOUBLE);
 }
예제 #14
0
		public NuGenRay2D(NuGenPnt2D p, NuGenVec2D v)
		{
			this.p = p;
			this.v = v;
		}
예제 #15
0
 public NuGenNuGenScale2D(double x, double y)
 {
     v = new NuGenVec2D(x, y);
 }
예제 #16
0
 public NuGenRay2D(NuGenPnt2D p, NuGenVec2D v)
 {
     this.p = p;
     this.v = v;
 }
예제 #17
0
		public NuGenShift2D(double x, double y)
		{
			v = new NuGenVec2D(x,y);
		}