/// <summary> /// <para>Clamps the Vector2Int to the bounds given by min and max.</para> /// </summary> /// <param name="min"></param> /// <param name="max"></param> public void Clamp(LVector2Int min, LVector2Int max) { this.x = LMath.Max(min.x, this.x); this.x = LMath.Min(max.x, this.x); this.y = LMath.Max(min.y, this.y); this.y = LMath.Min(max.y, this.y); }
public static LVector2 Min(LVector2 a, LVector2 b) { return(new LVector2(true, LMath.Min(a._x, b._x), LMath.Min(a._y, b._y))); }
public void Min(ref LVector2 r) { this._x = LMath.Min(this._x, r._x); this._y = LMath.Min(this._y, r._y); }