|
Zen API
|
Math-related utilities.
Go to the source code of this file.
Macros | |
| #define | kMath_Abs_(A) kxMath_Abs_(A) |
| Returns the absolute value of a number. | |
| #define | kMath_Clamp_(V, VMIN, VMAX) kxMath_Clamp_((V), (VMIN), (VMAX)) |
| Returns a value limited to the given range. | |
| #define | kMath_Common_Residue_(A, B) kxMath_Common_Residue_((A), (B)) |
| Returns the common residue of A and B. | |
| #define | kMath_DegToRad_(DEG) kxMath_DegToRad_(DEG) |
| Converts degrees to radians. | |
| #define | kMATH_E (2.7182818284590452353602874713527) |
| Mathematical constant e. | |
| #define | kMath_Max_(A, B) kxMath_Max_((A), (B)) |
| Returns the maximum of two numbers. | |
| #define | kMath_Min_(A, B) kxMath_Min_((A), (B)) |
| Returns the minimum of two numbers. | |
| #define | kMATH_PI (3.1415926535897932384626433832795) |
| Mathematical constant pi. | |
| #define | kMath_RadToDeg_(RAD) kxMath_RadToDeg_(RAD) |
| Converts radians to degrees. | |
| #define | kMath_Round16s_(A) kxMath_Round16s_(A) |
| Rounds a floating-point value and casts to an 16-bit signed integer. | |
| #define | kMath_Round16u_(A) kxMath_Round16u_(A) |
| Rounds a floating-point value and casts to an 16-bit unsigned integer. | |
| #define | kMath_Round32s_(A) kxMath_Round32s_(A) |
| Rounds a floating-point value and casts to an 32-bit signed integer. | |
| #define | kMath_Round32u_(A) kxMath_Round32u_(A) |
| Rounds a floating-point value and casts to an 32-bit unsigned integer. | |
| #define | kMath_Round64s_(A) kxMath_Round64s_(A) |
| Rounds a floating-point value and casts to an 64-bit signed integer. | |
| #define | kMath_Round64u_(A) kxMath_Round64u_(A) |
| Rounds a floating-point value and casts to an 64-bit unsigned integer. | |
| #define | kMath_Round8s_(A) kxMath_Round8s_(A) |
| Rounds a floating-point value and casts to an 8-bit signed integer. | |
| #define | kMath_Round8u_(A) kxMath_Round8u_(A) |
| Rounds a floating-point value and casts to an 8-bit unsigned integer. | |
| #define | kMath_Sign_(A) kxMath_Sign_(A) |
| Returns the sign of a number (-1, 0, +1). | |
| #define | kMATH_SQRT2 (1.4142135623730950488016887242097) |
| Square root of 2. | |
| #define | kMATH_SQRT3 (1.7320508075688772935274463415059) |
| Square root of 3. | |