Beispiel #1
0
 ///<summary>Clamps this instance x, y and z values between inclusiveMin and inclusiveMax.
 ///</summary>
 ///<param name="inclusiveMin">The inclusive lower bound of the clamping range.</param>
 ///<param name="inclusiveMax">The inclusive upper bound of the clamping range.</param>
 public void ClampThis(int inclusiveMin, int inclusiveMax)
 {
     Arit.Clamp(x, inclusiveMin, inclusiveMax);
     Arit.Clamp(y, inclusiveMin, inclusiveMax);
     Arit.Clamp(z, inclusiveMin, inclusiveMax);
 }
Beispiel #2
0
 ///<summary>Clamps this instance x, y and z values between respective inclusiveMin and inclusiveMax values.
 ///</summary>
 ///<param name="inclusiveMin">The respective inclusive lower bounds of the clamping range.</param>
 ///<param name="inclusiveMax">The respective inclusive upper bounds of the clamping range.</param>
 public void ClampThis(Int3 inclusiveMin, Int3 inclusiveMax)
 {
     Arit.Clamp(x, inclusiveMin.x, inclusiveMax.x);
     Arit.Clamp(y, inclusiveMin.y, inclusiveMax.y);
     Arit.Clamp(z, inclusiveMin.z, inclusiveMax.z);
 }
Beispiel #3
0
 ///<summary>Returns a new instance of Int3 with values of x, y and z clamped between respective inclusiveMin and inclusiveMax values.
 ///</summary>
 ///<param name="i">The instance of Int3 class to be clamped.</param>
 ///<param name="inclusiveMin">The respective inclusive lower bounds of the clamping range.</param>
 ///<param name="inclusiveMax">The respective inclusive upper bounds of the clamping range.</param>
 public static Int3 Clamp(Int3 i, Int3 inclusiveMin, Int3 inclusiveMax)
 {
     return(new Int3(Arit.Clamp(i.x, inclusiveMin.x, inclusiveMax.x),
                     Arit.Clamp(i.y, inclusiveMin.y, inclusiveMax.y),
                     Arit.Clamp(i.z, inclusiveMin.z, inclusiveMax.z)));
 }
Beispiel #4
0
 ///<summary>Returns a new instance of Int3 with values of x, y and z clamped between inclusiveMin and inclusiveMax.
 ///</summary>
 ///<param name="i">The instance of Int3 class to be clamped.</param>
 ///<param name="inclusiveMin">The inclusive lower bound of the clamping range.</param>
 ///<param name="inclusiveMax">The inclusive upper bound of the clamping range.</param>
 public static Int3 Clamp(Int3 i, int inclusiveMin, int inclusiveMax)
 {
     return(new Int3(Arit.Clamp(i.x, inclusiveMin, inclusiveMax),
                     Arit.Clamp(i.y, inclusiveMin, inclusiveMax),
                     Arit.Clamp(i.z, inclusiveMin, inclusiveMax)));
 }
Beispiel #5
0
 ///<summary>Clamps this instance x and y values between 0 and respective inclusiveMax values.
 ///</summary>
 ///<param name="inclusiveMax">The respective inclusive upper bounds of the clamping range.</param>
 public void ClampThis(Int2 inclusiveMax)
 {
     Arit.Clamp(x, inclusiveMax.x);
     Arit.Clamp(y, inclusiveMax.y);
 }
Beispiel #6
0
 ///<summary>Returns a new instance of <see cref="Int2"/> with values of x and y clamped between respective inclusiveMin and inclusiveMax values.
 ///</summary>
 ///<param name="i">The instance of <see cref="Int2"/> class to be clamped.</param>
 ///<param name="inclusiveMin">The respective inclusive lower bounds of the clamping range.</param>
 ///<param name="inclusiveMax">The respective inclusive upper bounds of the clamping range.</param>
 public static Int2 Clamp(Int2 i, Int2 inclusiveMin, Int2 inclusiveMax)
 {
     return(new Int2(Arit.Clamp(i.x, inclusiveMin.x, inclusiveMax.x), Arit.Clamp(i.y, inclusiveMin.y, inclusiveMax.y)));
 }
Beispiel #7
0
 ///<summary>Returns a new instance of <see cref="Int2"/> with values of x and y clamped between 0 and inclusiveMax.
 ///</summary>
 ///<param name="i">The instance of <see cref="Int2"/> class to be clamped.</param>
 ///<param name="inclusiveMax">The inclusive upper bound of the clamping range.</param>
 public static Int2 Clamp(Int2 i, int inclusiveMax)
 {
     return(new Int2(Arit.Clamp(i.x, inclusiveMax), Arit.Clamp(i.y, inclusiveMax)));
 }