1#ifndef COASTLINE_PLATFORM_WIN_PACKEDVALUE_H
2#define COASTLINE_PLATFORM_WIN_PACKEDVALUE_H
float ConvertCharToScaledFloat(signed char bValue)
Scale a field of a packet of one signed byte by 1/8.
float ConvertUintToScaledFloat(unsigned dwValue)
Scale a field by 1/8192.
float SignedByteToFloat(unsigned char bValue)
Scale a signed field of six bits by -1/128.
int ConvertFloatToFixedAngle16B(float fValue)
Round 128 times a value to the nearest integer, limited to the range of a short.
unsigned char QuantizeFloatToLightIndex(float fScale)
Get the light level of a brightness, the inverse of GetLightLevelScale().
int ConvertFloatToFixed24(float fValue)
Round twice a value to the nearest integer, limited to the range of a field of 24 bits.
int FloatToSignedShortIndex(float fValue)
Round 256 times a value to the nearest integer, limited to the range of a short.
float GetLightLevelScale(char nLightLevel)
Get the brightness of a light level.
float FixedToRadians(short nValue)
Scale a field of a packet of two bytes by 1/128.
int ConvertFloatToFixedAngle(float fValue)
Round -32768 times a value to the nearest integer, limited to the range of a short.
float EngineRpmIndexToFloat(unsigned char bIndex)
Map one of 64 steps to engine speed from 400 to 8000 RPM.
int FloatToEngineRpmIndex(float fValue)
Map engine speed from 400 to 8000 RPM to the nearest of 64 steps.
int ConvertFloatToFixedAngleNoClamp(float fValue)
Quantise a coordinate in steps of 1/8192 within the unsigned 24-bit range.
float ByteToFloat(unsigned char bValue)
Scale a field of a packet of one unsigned byte by 1.41015625.
int ConvertDoubleToSignedByte(double dValue)
Round 128 times a value to the nearest integer, limited to the range of a signed byte.
int ConvertFloatToSignedByte(float fValue)
Round 8 times a value to the nearest integer, limited to the range of a signed byte.
int FloatToSignedByteIndex(float fValue)
Round -128 times a value to the nearest integer, limited to the range of a field of six bits.
float Signed24BitToFloat(int nValue)
Scale a signed field of 24 bits by 1/2.
float SignedShortToFloat(short nValue)
Scale a field of a packet of two bytes by 1/256.
float ConvertFixedAngleToFloat(short nValue)
Scale a field of a packet of two bytes by -1/32768.
int FloatToByteIndex(float fValue)
Round a value divided by 1.41015625 to the nearest integer, limited to the range of an unsigned byte.