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