/// <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); }
/// <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); }
/// <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); }
/// <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); }
/// <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); }