#include <algorithm>
#include <cmath>
#include <cstdlib>
Go to the source code of this file.
|
constexpr int | round_to_int (float f) |
|
constexpr int | round_truncate (float f) |
|
template<typename T , typename TB > |
constexpr T | mix (const T a, const T b, TB amount) |
|
template<typename T , typename TB > |
T | bezier (const T p0, const T p1, const T p2, const T p3, TB amount) |
|
float | random_float () |
|
float | random_float (float min, float max) |
|
float | random_float (float max) |
|
float | random_angle () |
|
constexpr int | f2fx (float v) |
|
constexpr float | fx2f (int v) |
|
constexpr int | i2fx (int v) |
|
constexpr int | fx2i (int v) |
|
template<typename T > |
constexpr T | minimum (T a, T b) |
|
template<typename T > |
constexpr T | minimum (T a, T b, T c) |
|
template<typename T > |
constexpr T | maximum (T a, T b) |
|
template<typename T > |
constexpr T | maximum (T a, T b, T c) |
|
template<typename T > |
constexpr T | absolute (T a) |
|
template<typename T > |
constexpr T | in_range (T a, T lower, T upper) |
|
template<typename T > |
constexpr T | in_range (T a, T upper) |
|
|
constexpr float | pi = 3.1415926535897932384626433f |
|
constexpr int | fxpscale = 1 << 10 |
|
◆ absolute()
template<typename T >
constexpr T absolute |
( |
T |
a | ) |
|
|
inlineconstexpr |
◆ bezier()
template<typename T , typename TB >
T bezier |
( |
const T |
p0, |
|
|
const T |
p1, |
|
|
const T |
p2, |
|
|
const T |
p3, |
|
|
TB |
amount |
|
) |
| |
|
inline |
◆ f2fx()
constexpr int f2fx |
( |
float |
v | ) |
|
|
inlineconstexpr |
◆ fx2f()
constexpr float fx2f |
( |
int |
v | ) |
|
|
inlineconstexpr |
◆ fx2i()
constexpr int fx2i |
( |
int |
v | ) |
|
|
inlineconstexpr |
◆ i2fx()
constexpr int i2fx |
( |
int |
v | ) |
|
|
inlineconstexpr |
◆ in_range() [1/2]
template<typename T >
constexpr T in_range |
( |
T |
a, |
|
|
T |
lower, |
|
|
T |
upper |
|
) |
| |
|
inlineconstexpr |
◆ in_range() [2/2]
template<typename T >
constexpr T in_range |
( |
T |
a, |
|
|
T |
upper |
|
) |
| |
|
inlineconstexpr |
◆ maximum() [1/2]
template<typename T >
constexpr T maximum |
( |
T |
a, |
|
|
T |
b |
|
) |
| |
|
inlineconstexpr |
◆ maximum() [2/2]
template<typename T >
constexpr T maximum |
( |
T |
a, |
|
|
T |
b, |
|
|
T |
c |
|
) |
| |
|
inlineconstexpr |
◆ minimum() [1/2]
template<typename T >
constexpr T minimum |
( |
T |
a, |
|
|
T |
b |
|
) |
| |
|
inlineconstexpr |
◆ minimum() [2/2]
template<typename T >
constexpr T minimum |
( |
T |
a, |
|
|
T |
b, |
|
|
T |
c |
|
) |
| |
|
inlineconstexpr |
◆ mix()
template<typename T , typename TB >
constexpr T mix |
( |
const T |
a, |
|
|
const T |
b, |
|
|
TB |
amount |
|
) |
| |
|
inlineconstexpr |
◆ random_angle()
◆ random_float() [1/3]
◆ random_float() [2/3]
float random_float |
( |
float |
max | ) |
|
|
inline |
◆ random_float() [3/3]
float random_float |
( |
float |
min, |
|
|
float |
max |
|
) |
| |
|
inline |
◆ round_to_int()
constexpr int round_to_int |
( |
float |
f | ) |
|
|
inlineconstexpr |
◆ round_truncate()
constexpr int round_truncate |
( |
float |
f | ) |
|
|
inlineconstexpr |
◆ fxpscale
constexpr int fxpscale = 1 << 10 |
|
constexpr |
◆ pi
constexpr float pi = 3.1415926535897932384626433f |
|
constexpr |