public static ushort Pack(float f) { HalfUtils.FloatToUint floatToUint = new HalfUtils.FloatToUint(); floatToUint.floatValue = f; return((ushort)((uint)HalfUtils.FloatToHalfBaseTable[(IntPtr)(floatToUint.uintValue >> 23 & 511U)] + ((floatToUint.uintValue & 8388607U) >> (int)HalfUtils.FloatToHalfShiftTable[(IntPtr)(floatToUint.uintValue >> 23 & 511U)]))); }
public static ushort Pack(float f) { HalfUtils.FloatToUint floatToUint = new HalfUtils.FloatToUint(); floatToUint.floatValue = f; return (ushort) ((uint) HalfUtils.FloatToHalfBaseTable[(IntPtr) (floatToUint.uintValue >> 23 & 511U)] + ((floatToUint.uintValue & 8388607U) >> (int) HalfUtils.FloatToHalfShiftTable[(IntPtr) (floatToUint.uintValue >> 23 & 511U)])); }