コード例 #1
0
 /**
  * Copy constructor.
  *
  * @param tuple Tuple.
  */
 public BuffTuple2d(Tuple tuple)
 {
     if (tuple is Tuple2d)
     {
         Tuple2d _tuple = (Tuple2d)tuple;
         this.x = _tuple.GetX();
         this.y = _tuple.GetY();
     }
     else if (tuple is BuffTuple2d)
     {
         BuffTuple2d _tuple = (BuffTuple2d)tuple;
         this.x = _tuple.GetX();
         this.y = _tuple.GetY();
     }
     else
     {
         Tuple2d _tuple = new Tuple2d(tuple);
         this.x = _tuple.GetX();
         this.y = _tuple.GetY();
     }
 }
コード例 #2
0
 /**
  * Copy constructor.
  *
  * @param tuple Tuple.
  */
 public BuffTuple2d(Tuple2d tuple)
 {
     this.x = tuple.GetX();
     this.y = tuple.GetY();
 }
コード例 #3
0
 public bool EpsilonEquals(Tuple2d other, double epsilon = EPSILON)
 {
     return(EpsilonEquals(other.GetX(),
                          other.GetY(), epsilon));
 }
コード例 #4
0
 public bool Equals(Tuple2d other)
 {
     return(Equals(other.GetX(),
                   other.GetY()));
 }
コード例 #5
0
ファイル: Point2d.cs プロジェクト: xuchuansheng/GenXSource
		/// <summary> Constructs and initializes a Point2d from the specified Tuple2d.</summary>
		/// <param name="t1">the Tuple2d containing the initialization x y data
		/// </param>
		public Point2d(Tuple2d t1):base(t1)
		{
		}
コード例 #6
0
ファイル: Vector2f.cs プロジェクト: xuchuansheng/GenXSource
		/// <summary> Constructs and initializes a Vector2f from the specified Tuple2d.</summary>
		/// <param name="t1">the Tuple2d containing the initialization x y data
		/// </param>
		public Vector2f(Tuple2d t1):base(t1)
		{
		}
コード例 #7
0
ファイル: Tuple2f.cs プロジェクト: xuchuansheng/GenXSource
		/// <summary> Sets the value of this tuple to the value of the Tuple2d argument.</summary>
		/// <param name="t1">the tuple to be copied
		/// </param>
		public void  set_Renamed(Tuple2d t1)
		{
			//UPGRADE_WARNING: Data types in Visual C# might be different.  Verify the accuracy of narrowing conversions. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1042'"
			x = (float) t1.x;
			//UPGRADE_WARNING: Data types in Visual C# might be different.  Verify the accuracy of narrowing conversions. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1042'"
			y = (float) t1.y;
		}
コード例 #8
0
 /**
  * Copy constructor.
  *
  * @param tuple Tuple.
  */
 public Vector2d(Tuple2d tuple)
 {
     this.x = tuple.GetX();
     this.y = tuple.GetY();
 }