Runtime/VoxelRay.cs
/// <summary>
/// Gets the negative sign of the supplied number. So, in other words, if the number is negative, -1 is returned but if the number is positive or zero, then zero is returned.
/// </summary>
/// <param name="number"></param>
/// <returns></returns>
Gets the negative sign of the supplied number. So, in other words, if the number is negative, -1 is returned but if the number is positive or zero, then zero is returned.
Gets the negative sign of the supplied number . So in other words if the number is negative - 1 is returned but if the number is positive or zero then zero is returned .
public static int3 GetNegativeSign(int3 number)
        {
            return new int3(math.asint(number.x) >> (32 - 1),
                            math.asint(number.y) >> (32 - 1),
                            math.asint(number.z) >> (32 - 1)); 
        }
public static int3 GetNegativeSign ( int3 number ) { return new int3 ( math . asint ( number . x ) >> ( 32 - 1 ) , math . asint ( number . y ) >> ( 32 - 1 ) , math . asint ( number . z ) >> ( 32 - 1 ) ) ; }
Gets the negative sign of the supplied number.
Gets the negative sign of the supplied number .
//int are always 32bit in c# and -1 for sign bit which is at position 31
None
number
int3
None