示例#1
0
 double CellCodeToFloat(CellCode cellCode)
 {
     var bytes = BitConverter.GetBytes((ulong)cellCode);
     return BitConverter.ToDouble(bytes, 0);
 }
示例#2
0
 double CellIndexToFloat(CellCode code, uint index)
 {
     var bytes = BitConverter.GetBytes((ulong)((index << 4) + (ulong)code));
     return BitConverter.ToDouble(bytes, 0);
 }
示例#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;
 }