Assets/Scripts/Utils.cs
/// <summary>
/// Floors the value to a multiple of x
/// </summary>
/// <param name="n">The value to floor</param>
/// <param name="x">The multiple to floor to</param>
/// <returns>The floored value</returns>
Floors the value to a multiple of x
Floors the value to a multiple of x
[MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static int3 FloorToMultipleOfX(this float3 n, int x)
        {
            return (int3)(math.floor(n / x) * x);
        }
[ MethodImpl ( MethodImplOptions . AggressiveInlining ) ] public static int3 FloorToMultipleOfX ( this float3 n , int x ) { return ( int3 ) ( math . floor ( n / x ) * x ) ; }
Floors the value to a multiple of x
Floors the value to a multiple of x
The floored value
The floored value
float3
this
x
int
The multiple to floor to
The multiple to floor to
n
The value to floor
The value to floor