Esempio n. 1
0
 public static long doubleToRawLongBits(double value)
 {
     IKVM.Runtime.DoubleConverter converter = new IKVM.Runtime.DoubleConverter();
     return IKVM.Runtime.DoubleConverter.ToLong(value, ref converter);
 }
Esempio n. 2
0
 public static double longBitsToDouble(long bits)
 {
     IKVM.Runtime.DoubleConverter converter = new IKVM.Runtime.DoubleConverter();
     return IKVM.Runtime.DoubleConverter.ToDouble(bits, ref converter);
 }
Esempio n. 3
0
 public static void doublesToBytes(double[] src, int srcpos, byte[] dst, int dstpos, int ndoubles)
 {
     IKVM.Runtime.DoubleConverter converter = new IKVM.Runtime.DoubleConverter();
     for (int i = 0; i < ndoubles; i++)
     {
         long v = IKVM.Runtime.DoubleConverter.ToLong(src[srcpos++], ref converter);
         dst[dstpos++] = (byte)(v >> 56);
         dst[dstpos++] = (byte)(v >> 48);
         dst[dstpos++] = (byte)(v >> 40);
         dst[dstpos++] = (byte)(v >> 32);
         dst[dstpos++] = (byte)(v >> 24);
         dst[dstpos++] = (byte)(v >> 16);
         dst[dstpos++] = (byte)(v >> 8);
         dst[dstpos++] = (byte)(v >> 0);
     }
 }
Esempio n. 4
0
 public static void bytesToDoubles(byte[] src, int srcpos, double[] dst, int dstpos, int ndoubles)
 {
     IKVM.Runtime.DoubleConverter converter = new IKVM.Runtime.DoubleConverter();
     for (int i = 0; i < ndoubles; i++)
     {
         long v = src[srcpos++];
         v = (v << 8) | src[srcpos++];
         v = (v << 8) | src[srcpos++];
         v = (v << 8) | src[srcpos++];
         v = (v << 8) | src[srcpos++];
         v = (v << 8) | src[srcpos++];
         v = (v << 8) | src[srcpos++];
         v = (v << 8) | src[srcpos++];
         dst[dstpos++] = IKVM.Runtime.DoubleConverter.ToDouble(v, ref converter);
     }
 }
Esempio n. 5
0
 public static double ToDouble( long value )
 {
     IKVM.Runtime.DoubleConverter converter = new IKVM.Runtime.DoubleConverter();
     return IKVM.Runtime.DoubleConverter.ToDouble( value, ref converter );
 }
Esempio n. 6
0
 public static double ToDouble(long value)
 {
     IKVM.Runtime.DoubleConverter converter = new IKVM.Runtime.DoubleConverter();
     return(IKVM.Runtime.DoubleConverter.ToDouble(value, ref converter));
 }
Esempio n. 7
0
 public static long ToLong(double value)
 {
     IKVM.Runtime.DoubleConverter converter = new IKVM.Runtime.DoubleConverter();
     return(IKVM.Runtime.DoubleConverter.ToLong(value, ref converter));
 }