Esempio n. 1
0
 public static uint AsUint(float a)
 {
     Debug.Assert(sizeof(uint) == sizeof(float));
     UnsafeScalarCast cast = new UnsafeScalarCast();
     cast._float = a;
     return cast._uint;
 }
Esempio n. 2
0
 public static float AsFloat(int a)
 {
     Debug.Assert(sizeof(int) == sizeof(float));
     UnsafeScalarCast cast = new UnsafeScalarCast();
     cast._int = a;
     return cast._float;
 }