//@Static /// <summary> /// Adds border and vector together. /// </summary> /// <param name="border"> The source border. </param> /// <param name="vector"> The added vector. </param> /// <returns> The resulting border. </returns> public static TransformerBorder Add(TransformerBorder border, Vector2 vector) => new TransformerBorder ( left: border.Left + vector.X, top: border.Top + vector.Y, right: border.Right + vector.X, bottom: border.Bottom + vector.Y );
/// <summary> /// Returns a boolean indicating whether the given TransformerBorder is equal to this TransformerBorder instance. /// </summary> /// <param name="other"> The TransformerBorder to compare this instance to. </param> /// <returns> Return **true** if the other TransformerBorder is equal to this instance, otherwise **false**. </returns> public bool Equals(TransformerBorder other) { if (this.Left != other.Left) { return(false); } if (this.Top != other.Top) { return(false); } if (this.Right != other.Right) { return(false); } if (this.Bottom != other.Bottom) { return(false); } return(true); }
/// <summary> /// Adds border and vector together. /// </summary> /// <param name="value1"> The source border. </param> /// <param name="value2"> The source vector. </param> /// <returns> The summed border. </returns> public static TransformerBorder operator +(TransformerBorder value1, Vector2 value2) => TransformerBorder.Add(value1, value2);