Пример #1
0
 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)])));
 }
Пример #2
0
 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)]));
 }