/**
  * Copy constructor.
  *
  * @param tuple Tuple.
  */
 public BuffTuple2f(Tuple tuple)
 {
     if (tuple is Tuple2f)
     {
         Tuple2f _tuple = (Tuple2f)tuple;
         this.x = _tuple.GetX();
         this.y = _tuple.GetY();
     }
     else if (tuple is BuffTuple2f)
     {
         BuffTuple2f _tuple = (BuffTuple2f)tuple;
         this.x = _tuple.GetX();
         this.y = _tuple.GetY();
     }
     else
     {
         Tuple2f _tuple = new Tuple2f(tuple);
         this.x = _tuple.GetX();
         this.y = _tuple.GetY();
     }
 }
 /**
  * Copy constructor.
  *
  * @param tuple Tuple.
  */
 public BuffTuple2f(Tuple2f tuple)
 {
     this.x = tuple.GetX();
     this.y = tuple.GetY();
 }
 public bool Equals(Tuple2f other)
 {
     return(Equals(other.GetX(),
                   other.GetY()));
 }
 public bool EpsilonEquals(Tuple2f other, double epsilon = EPSILON)
 {
     return(EpsilonEquals(other.GetX(),
                          other.GetY(), epsilon));
 }
Example #5
0
 /**
  * Copy constructor.
  *
  * @param tuple Tuple.
  */
 public Vector2f(Tuple2f tuple)
 {
     this.x = tuple.GetX();
     this.y = tuple.GetY();
 }