Banjo API 0.0.1
Multi-purpose C99 API
|
Linear math library. More...
Math constants and wrapped standard math functions.
This header provides commonly used math constants and wraps standard math functions with a BJ_ prefix for consistency.
Go to the source code of this file.
Macros | |
#define | BJ_PI (3.14159265358979323846) |
The mathematical constant π (pi). | |
#define | bj_acosf acosf |
Wrapper for the standard acosf() function. | |
#define | bj_cosf cosf |
Wrapper for the standard cosf() function. | |
#define | bj_expf expf |
Wrapper for the standard expf() function. | |
#define | bj_fabs fabs |
Wrapper for the standard fabs() function. | |
#define | bj_fabsf fabsf |
Wrapper for the standard fabsf() function. | |
#define | bj_floor floor |
Wrapper for the standard floor() function. | |
#define | bj_floorf floorf |
Wrapper for the standard floorf() function. | |
#define | bj_fmaxf fmaxf |
Wrapper for the standard fmaxf() function. | |
#define | bj_fminf fminf |
Wrapper for the standard fminf() function. | |
#define | bj_fmod fmod |
Wrapper for the standard fmod() function. | |
#define | bj_powf powf |
Wrapper for the standard powf() function. | |
#define | bj_round round |
Wrapper for the standard round() function. | |
#define | bj_sin sin |
Wrapper for the standard sin() function. | |
#define | bj_sinf sinf |
Wrapper for the standard sinf() function. | |
#define | bj_sqrtf sqrtf |
Wrapper for the standard sqrtf() function. | |
#define | bj_tanf tanf |
Wrapper for the standard tanf() function. | |
Functions | |
float | bj_clamp (float x, float min, float max) |
Clamps a float between a minimum and a maximum value. | |
float | bj_step (float edge, float x) |
Returns 0.0 if x < edge , else 1.0. | |
float | bj_smoothstep (float edge0, float edge1, float x) |
Performs smooth Hermite interpolation between 0 and 1 over a range. | |
float | bj_fract (float x) |
Returns the fractional part of a float. | |
int | bj_mod (float x, float y) |
Computes a floor-style modulus between two floats. | |