libyggdrasil
v1.0.0
|
Functions | |
template<typename T > | |
constexpr T | clamp (T value, T min, T max) |
Clamps a input value between a min and max value. More... | |
template<typename T > | |
constexpr T | degreeToRadian (T deg) |
Conversion between degree and radian. More... | |
template<typename T > | |
constexpr T | radianToDegree (T rad) |
Conversion between radian and degree. More... | |
constexpr ALWAYS_INLINE u64 | operator""_kB (u64 n) |
Kibibyte literal. More... | |
constexpr ALWAYS_INLINE u64 | operator""_MB (u64 n) |
Mibibyte literal. More... | |
constexpr ALWAYS_INLINE u64 | operator""_GB (u64 n) |
Gibibyte literal. More... | |
template<u16 Polynomial = 0x8005> | |
constexpr u16 | crc16 (const auto &data, u16 initialValue=0x00) |
Calculates the CRC16 Checksum of the data in a container. More... | |
template<u32 Polynomial = 0x04C11DB7> | |
u32 | crc32 (const auto &data, u32 initialValue=0x00) |
Calculates the CRC32 Checksum of the data in a container. More... | |
constexpr ALWAYS_INLINE u8 | bcdToBinary (u8 bcd) |
Converts a Binary Coded Decimal value to Binary. More... | |
constexpr ALWAYS_INLINE u8 | binaryToBcd (u8 bin) |
Converts a Binary value to Binary Coded Decimal. More... | |
|
constexpr |
Converts a Binary Coded Decimal value to Binary.
bcd | BCD input |
|
constexpr |
Converts a Binary value to Binary Coded Decimal.
bin | Binary input |
|
constexpr |
Clamps a input value between a min and max value.
value | Input |
min | Min value |
max | Max value |
|
constexpr |
Calculates the CRC16 Checksum of the data in a container.
Polynomial | Polynomial used to calculate LUT |
data | Iterateable Container type |
initialValue | Value to start at |
u32 bsp::math::crc32 | ( | const auto & | data, |
u32 | initialValue = 0x00 |
||
) |
Calculates the CRC32 Checksum of the data in a container.
Polynomial | Polynomial used to calculate LUT |
data | Iterateable Container type |
initialValue | Value to start at |
|
constexpr |
Conversion between degree and radian.
deg | Degree |
|
constexpr |
Gibibyte literal.
|
constexpr |
Kibibyte literal.
|
constexpr |
Mibibyte literal.
|
constexpr |
Conversion between radian and degree.
rad | Radians |