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

            return(
                _x[0] == x._x[0] &&
                _x[1] == x._x[1]
                );
        }
Esempio n. 3
0
 public bool IsOnBorder(NuGenPnt2F p)
 {
     return IsInsideOrOnBorder(p) && !IsInside(p);
 }
Esempio n. 4
0
 public NuGenBox2F(NuGenPnt2F lower, NuGenPnt2F upper)
 {
     this.lower = lower;
     this.upper = upper;
 }
Esempio n. 5
0
 public bool IsInside(NuGenPnt2F p)
 {
     return lower < p && upper > p;
 }
Esempio n. 6
0
 public bool IsInsideOrOnBorder(NuGenPnt2F p)
 {
     return lower <= p && upper >= p;
 }
Esempio n. 7
0
 public static bool ApproxEquals(NuGenPnt2F a, NuGenPnt2F b)
 {
     return
         (Math.Abs(a._x[0] - b._x[0]) < NuGenVector.TINY_FLOAT &&
          Math.Abs(a._x[1] - b._x[1]) < NuGenVector.TINY_FLOAT);
 }
Esempio n. 8
0
 public NuGenRay2F(NuGenPnt2F p, NuGenVec2F v)
 {
     this.p = p;
     this.v = v;
 }
Esempio n. 9
0
 public NuGenRay2F(NuGenPnt2F p, NuGenVec2F v)
 {
     this.p = p;
     this.v = v;
 }
Esempio n. 10
0
 public static NuGenPnt2F Max(NuGenPnt2F a, NuGenPnt2F b)
 {
     return new NuGenPnt2F(
         Math.Max(a._x[0], b._x[0]),
         Math.Max(a._x[1], b._x[1])
         );
 }
Esempio n. 11
0
 public static NuGenBox2F operator +(NuGenBox2F b, NuGenBox2F c)
 {
     return(new NuGenBox2F(NuGenPnt2F.Min(b.lower, c.lower), NuGenPnt2F.Max(b.upper, c.upper)));
 }
Esempio n. 12
0
 public NuGenBox2F(NuGenPnt2F lower, NuGenPnt2F upper)
 {
     this.lower = lower;
     this.upper = upper;
 }
Esempio n. 13
0
 public bool IsOnBorder(NuGenPnt2F p)
 {
     return(IsInsideOrOnBorder(p) && !IsInside(p));
 }
Esempio n. 14
0
 public bool IsInsideOrOnBorder(NuGenPnt2F p)
 {
     return(lower <= p && upper >= p);
 }
Esempio n. 15
0
 public bool IsInside(NuGenPnt2F p)
 {
     return(lower < p && upper > p);
 }