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