예제 #1
0
 /// <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);
 }
예제 #2
0
 public void Max(ref LVector2 r)
 {
     this._x = LMath.Max(this._x, r._x);
     this._y = LMath.Max(this._y, r._y);
 }
예제 #3
0
 public static LVector2 Max(LVector2 a, LVector2 b)
 {
     return(new LVector2(true, LMath.Max(a._x, b._x), LMath.Max(a._y, b._y)));
 }