コード例 #1
0
 /// <summary>
 /// Method for checking if two vectors coordinates match.
 /// </summary>
 /// <param name="other">Vector to match with.</param>
 /// <returns>Returns if THIS vector's coordinates matches OTHER vector's coordinates.</returns>
 public bool Match(IntVector2D other)
 {
     return(this.X == other.X && this.Y == other.Y);
 }
コード例 #2
0
 /// <summary>
 /// Method for multiplying two integer vectors.
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public IntVector2D mult(IntVector2D other)
 {
     this.X *= other.X;
     this.Y *= other.Y;
     return(this);
 }
コード例 #3
0
 /// <summary>
 /// Method for subtracting two integer vectors.
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public IntVector2D sub(IntVector2D other)
 {
     this.X -= other.X;
     this.Y -= other.Y;
     return(this);
 }
コード例 #4
0
 /// <summary>
 /// Method for dividing two integer vectors.
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public IntVector2D div(IntVector2D other)
 {
     this.X /= other.X;
     this.Y /= other.Y;
     return(this);
 }
コード例 #5
0
 /// <summary>
 /// Method for adding two integer vectors.
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public IntVector2D add(IntVector2D other)
 {
     this.X += other.X;
     this.Y += other.Y;
     return(this);
 }