예제 #1
0
 public static double AsDouble(ulong a)
 {
     Debug.Assert(sizeof(ulong) == sizeof(double));
     UnsafeScalarCastLong cast = new UnsafeScalarCastLong();
     cast._ulong = a;
     return cast._double;
 }
예제 #2
0
 public static ulong AsULong(double a)
 {
     Debug.Assert(sizeof(ulong) == sizeof(double));
     UnsafeScalarCastLong cast = new UnsafeScalarCastLong();
     cast._double = a;
     return cast._ulong;
 }