Esempio n. 1
0
 double CellCodeToFloat(CellCode cellCode)
 {
     var bytes = BitConverter.GetBytes((ulong)cellCode);
     return BitConverter.ToDouble(bytes, 0);
 }
Esempio n. 2
0
 double CellIndexToFloat(CellCode code, uint index)
 {
     var bytes = BitConverter.GetBytes((ulong)((index << 4) + (ulong)code));
     return BitConverter.ToDouble(bytes, 0);
 }
Esempio n. 3
0
 bool CompareCellCodes(double pixelCode, CellCode cellCode)
 {
     var bytes = BitConverter.GetBytes(pixelCode);
     uint code = BitConverter.ToUInt32(bytes, 0);
     return (CellCode)(code - ((code>>4)<<4)) == cellCode;
 }