|
MTS_EXPORT_CORE Float | erf (Float x) |
| Cross-platform implementation of the error function. More...
|
|
MTS_EXPORT_CORE Float | erfinv (Float x) |
| Cross-platform implementation of the inverse error function. More...
|
|
MTS_EXPORT_CORE float | hypot2 (float a, float b) |
| sqrt(a^2 + b^2) without range issues (like 'hypot' on compilers that support C99, single precision) More...
|
|
MTS_EXPORT_CORE double | hypot2 (double a, double b) |
| sqrt(a^2 + b^2) without range issues (like 'hypot' on compilers that support C99, double precision) More...
|
|
MTS_EXPORT_CORE float | log2 (float value) |
| Base-2 logarithm (single precision) More...
|
|
MTS_EXPORT_CORE double | log2 (double value) |
| Base-2 logarithm (double precision) More...
|
|
template<typename Scalar > |
Scalar | clamp (Scalar value, Scalar min, Scalar max) |
| Generic clamping function. More...
|
|
template<typename Scalar > |
Scalar | lerp (Scalar t, Scalar v1, Scalar v2) |
| Linearly interpolate between two values. More...
|
|
template<typename Scalar > |
Scalar | smoothStep (Scalar min, Scalar max, Scalar value) |
| S-shaped smoothly varying interpolation between two values. More...
|
|
int32_t | modulo (int32_t a, int32_t b) |
| Always-positive modulo function (assumes b > 0) More...
|
|
int64_t | modulo (int64_t a, int64_t b) |
| Always-positive modulo function (assumes b > 0) More...
|
|
float | modulo (float a, float b) |
| Always-positive modulo function, single precision version (assumes b > 0) More...
|
|
double | modulo (double a, double b) |
| Always-positive modulo function, double precision version (assumes b > 0) More...
|
|
template<typename Scalar > |
int | floorToInt (Scalar value) |
| Integer floor function (single precision) More...
|
|
template<typename Scalar > |
int | ceilToInt (Scalar value) |
| Integer ceil function (single precision) More...
|
|
int | roundToInt (float value) |
| Integer round function (single precision) More...
|
|
int | roundToInt (double value) |
| Integer round function (double precision) More...
|
|
MTS_EXPORT_CORE int | log2i (uint32_t value) |
| Base-2 logarithm (32-bit integer version) More...
|
|
MTS_EXPORT_CORE int | log2i (uint64_t value) |
| Base-2 logarithm (64-bit integer version) More...
|
|
bool | isPowerOfTwo (uint32_t i) |
| Check if an integer is a power of two (unsigned 32 bit version) More...
|
|
bool | isPowerOfTwo (int32_t i) |
| Check if an integer is a power of two (signed 32 bit version) More...
|
|
bool | isPowerOfTwo (uint64_t i) |
| Check if an integer is a power of two (64 bit version) More...
|
|
bool | isPowerOfTwo (int64_t i) |
| Check if an integer is a power of two (signed 64 bit version) More...
|
|
MTS_EXPORT_CORE uint32_t | roundToPowerOfTwo (uint32_t i) |
| Round an integer to the next power of two. More...
|
|
MTS_EXPORT_CORE uint64_t | roundToPowerOfTwo (uint64_t i) |
| Round an integer to the next power of two (64 bit version) More...
|
|
float | fastexp (float value) |
|
double | fastexp (double value) |
|
float | fastlog (float value) |
|
double | fastlog (double value) |
|
void | sincos (float theta, float *_sin, float *_cos) |
|
void | sincos (double theta, double *_sin, double *_cos) |
|
float | safe_asin (float value) |
| Arcsine variant that gracefully handles arguments > 1 that are due to roundoff errors. More...
|
|
double | safe_asin (double value) |
| Arcsine variant that gracefully handles arguments > 1 that are due to roundoff errors. More...
|
|
float | safe_acos (float value) |
| Arccosine variant that gracefully handles arguments > 1 that are due to roundoff errors. More...
|
|
double | safe_acos (double value) |
| Arccosine variant that gracefully handles arguments > 1 that are due to roundoff errors. More...
|
|
float | safe_sqrt (float value) |
| Square root variant that gracefully handles arguments < 0 that are due to roundoff errors. More...
|
|
double | safe_sqrt (double value) |
| Square root variant that gracefully handles arguments < 0 that are due to roundoff errors. More...
|
|
Float | signum (Float value) |
| Simple signum function – note that it returns the FP sign of the input (and never zero) More...
|
|
float | castflt_up (float val) |
| Cast to single precision and round up if not exactly representable (passthrough) More...
|
|
float | castflt_up (double val) |
| Cast to single precision and round up if not exactly representable. More...
|
|
float | castflt_down (float val) |
| Cast to single precision and round down if not exactly representable (passthrough) More...
|
|
float | castflt_down (double val) |
| Cast to single precision and round down if not exactly representable. More...
|
|
Contains elementary 1D math functions that were either not provided by the standard, or which are not consistently provided on all platforms/compilers