16#define _USE_MATH_DEFINES
25#define BJ_PI (3.14159265358979323846)
81#define bj_floorf floorf
121#define bj_round round
145#define bj_sqrtf sqrtf
General-purpose definitions for Banjo API.
float bj_clamp(float x, float min, float max)
Clamps a float between a minimum and a maximum value.
int bj_mod(float x, float y)
Computes a floor-style modulus between two floats.
float bj_smoothstep(float edge0, float edge1, float x)
Performs smooth Hermite interpolation between 0 and 1 over a range.
float bj_step(float edge, float x)
Returns 0.0 if x < edge, else 1.0.
float bj_fract(float x)
Returns the fractional part of a float.