Assets/Scripts/Utils.cs
/// <summary>
/// Calculates the remainder of a division operation for int3. Ensures that the returned value is positive
/// </summary>
/// <param name="n">The divident</param>
/// <param name="x">The divisor</param>
/// <returns>The remainder of n/x</returns>
Calculates the remainder of a division operation for int3. Ensures that the returned value is positive
Calculates the remainder of a division operation for int3 . Ensures that the returned value is positive
[MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static int3 Mod(this int3 n, int x)
        {
            return (n % x + x) % x;
        }
[ MethodImpl ( MethodImplOptions . AggressiveInlining ) ] public static int3 Mod ( this int3 n , int x ) { return ( n % x + x ) % x ; }
Calculates the remainder of a division operation for int3.
Calculates the remainder of a division operation for int3 .
The remainder of n/x
The remainder of n / x
int3
this
x
int
None
n
None