public static float byteToFloat(byte[] bytes, bool isLittleEndian) { if (bytes.Length > 1) { return(BitConverter.ToSingle(NetCDFTools.endianConversion(bytes, isLittleEndian != ComputerIsLittleEndian), 0)); } else { return(Convert.ToSingle(bytes[0])); } }
public static float byteToFloat(byte[] bytes) { if (bytes.Length > 1) { return(BitConverter.ToSingle(NetCDFTools.endianConversion(bytes), 0)); } else { return(Convert.ToSingle(bytes[0])); } }
public static short byteToShort(byte[] bytes) { return(BitConverter.ToInt16(NetCDFTools.endianConversion(bytes), 0)); }
public static uint byteToUint(byte[] bytes) { return(BitConverter.ToUInt32(NetCDFTools.endianConversion(bytes), 0)); }
public static double byteToDouble(byte[] bytes) { return(BitConverter.ToDouble(NetCDFTools.endianConversion(bytes), 0)); }