|
template<typename T > |
T | ABS (T a) |
| Absolute value of 'a'.
|
|
template<typename T > |
T | MIN (T a, T b) |
| Minimum of 'a' and 'b'.
|
|
template<typename T > |
T | MAX (T a, T b) |
| Maximum of 'a' and 'b'.
|
|
template<typename T > |
T | MIN3 (T a, T b, T c) |
| Minimum of three values: a, b, c.
|
|
template<typename T > |
T | MAX3 (T a, T b, T c) |
| Maximum of three values: a, b, c.
|
|
template<typename T > |
T | MIN4 (T a, T b, T c, T d) |
| Minimum of four values: a, b, c, d.
|
|
template<typename T > |
T | MAX4 (T a, T b, T c, T d) |
| Maximum of four values: a, b, c, d.
|
|
template<typename T > |
T | SQR (T a) |
| Square of 'a'.
|
|
template<typename T > |
AtInt64 | FLOOR (T a) |
| Largest integer that is smaller than or equal to 'a'.
|
|
template<typename T > |
AtInt64 | CEIL (T a) |
| Smallest integer that is bigger than or equal to 'a'.
|
|
template<typename T > |
AtInt64 | ROUND (T a) |
| Round 'a' to nearest int.
|
|
template<typename T > |
int | SGN (T a) |
| Take binary sign of 'a' (either -1, or 1 if >= 0)
|
|
template<typename T > |
void | SWAP (T &a, T &b) |
| Swap 'a' and 'b'.
|
|
template<typename T > |
T | CLAMP (T v, T lo, T hi) |
| Clamp the input to the specified range.
|
|
template<typename T > |
T | ACOS (T x) |
| Safe arc cosine of 'x' (acos() returns NaN if x>1)
|
|
template<typename T > |
T | LERP (T t, T a, T b) |
| Linear interpolation between 'a' and 'b' using 't' (0<=t<=1)
|
|
template<typename T > |
T | HERP01 (T t) |
| Hermite interpolation between 0 and 1 using 't' (0<=t<=1)
|
|
template<typename T > |
T | HERP (T t, T a, T b) |
| Hermite interpolation between 'a' and 'b' using 't' (0<=t<=1)
|
|
template<typename T > |
T | BILERP (T s, T t, T c00, T c10, T c01, T c11) |
| Bilinear interpolation between four float values using 's' and 't' (0<=st<=1)
|
|
template<typename T > |
T | BIHERP (T s, T t, T c00, T c10, T c01, T c11) |
| Bicubic Hermite interpolation between four float values using 's' and 't' (0<=st<=1)
|
|
template<typename T > |
T | BIAS (T a, T b) |
| Bias function.
|
|
template<typename T > |
T | GAIN (T a, T g) |
| Gain function.
|
|
template<typename T > |
T | STEP (T x, T e) |
| Step function.
|
|
template<typename T > |
T | FILTERSTEP (T x, T e, T w) |
| Filtered-step function.
|
|
template<typename T > |
T | LINEARSTEP (T lo, T hi, T t) |
| Linearly interpolated step from 'lo' to 'hi'. More...
|
|
template<typename T > |
T | SMOOTHSTEP (T e0, T e1, T t) |
| RenderMan's smoothstep() function. More...
|
|
AI_API bool | AiIsFinite (float x) |
| Test to see if the given floating point number is finite (not NaN and not infinite) as defined by the IEEE-754 standard. More...
|
|
AI_API float | fast_exp (float x) |
| Fast, approximate expf(). More...
|
|
Portable definitions for common basic types (different sizes of integer, etc). Using these types ensures portability of client code across platforms.
AI_API float fast_exp |
( |
float |
x | ) |
|
Fast, approximate expf().
Maximum error is 392 ulp for x between [-72,72], 372 ulp between [-8,8], and 209 ulp between [0,2].
- Parameters
-
x | floating point value between [-72,72] |
- Returns
- exp(x) accurate to within 372 ulp