/// <summary> /// /// </summary> public int ToInt(EndianMode mode = EndianMode.Big) { var sum = 0; for (var i = 0; i < 8; i++) { sum += _bits[i].Value ? (int)Math.Pow(2, mode == EndianMode.Big ? (8 - (i + 1)) : i) : 0; } return(sum); }
public void SetEndianness(EndianMode endianMode) { CheckNull(); CheckDefine(); NcCheck.Check(NetCDF.nc_def_var_endian(groupId, myId, (int)endianMode)); }
public NBTReader(FileStream f, Encoding e, EndianMode mode = EndianMode.Big) : base(f, e) { EndianMode = mode; }