(986a3bf)
#include "utils/cast.h"
#include <string>
#include <cmath>
#include "localconsts.h"
Go to the source code of this file.
◆ fastInvSqrt()
float fastInvSqrt |
( |
float |
x | ) |
|
|
inline |
◆ fastSqrt()
float fastSqrt |
( |
const float |
x | ) |
|
|
inline |
◆ fastSqrtInt()
int fastSqrtInt |
( |
const unsigned int |
n | ) |
|
|
inline |
◆ getCrc16()
uint16_t getCrc16 |
( |
const std::string & |
str | ) |
|
|
inline |
Definition at line 186 of file mathutils.h.
188 size_t f = str.size();
189 uint16_t crc16 = 0xffff;
195 crc_table[(crc16 ^ (str[f])) & 0xff] ^ (crc16 >> 8));
static const uint16_t crc_table[256]
References CAST_U16, and crc_table.
◆ powerOfTwo()
int powerOfTwo |
( |
const unsigned int |
input | ) |
|
|
inline |
◆ roundDouble()
int roundDouble |
( |
const double |
v | ) |
|
|
inline |
◆ weightedAverage()
float weightedAverage |
( |
const float |
n1, |
|
|
const float |
n2, |
|
|
const float |
w |
|
) |
| |
|
inline |
Definition at line 226 of file mathutils.h.
229 return w < 0.0F ? n1 : (w > 1.0F ? n2 : w * n2 + (1.0F - w) * n1);
◆ crc_table
const uint16_t crc_table[256] |
|
static |
◆ square_roots
const uint8_t square_roots[1000] |
|
static |