Пример #1
0
 public static uint AsUint(float a)
 {
     Debug.Assert(sizeof(uint) == sizeof(float));
     UnsafeScalarCast cast = new UnsafeScalarCast();
     cast._float = a;
     return cast._uint;
 }
Пример #2
0
 public static float AsFloat(int a)
 {
     Debug.Assert(sizeof(int) == sizeof(float));
     UnsafeScalarCast cast = new UnsafeScalarCast();
     cast._int = a;
     return cast._float;
 }