59#define BJ_GRAVITATIONAL_CONSTANT_SI BJ_F(6.67430e-11)
81 return BJ_F(0.5) * acceleration * time * time + velocity * time + position;
101 return acceleration * time + velocity;
122 return g * (m1 * m2) / (r * r);
#define BJ_INLINE
BJ_INLINE expands to an inline specifier appropriate for the toolchain.
#define BJ_FZERO
Zero constant in bj_real.
#define BJ_F(x)
Literal suffix helper for bj_real when float is selected.
float bj_real
Selected real type for float configuration.
static bj_real bj_newton_gravitation(bj_real m1, bj_real m2, bj_real r, bj_real g)
Newton’s law of universal gravitation: force magnitude.
static bj_real bj_newton_plummer_gravitation(bj_real m1, bj_real m2, bj_real r, bj_real g, bj_real eps)
Newtonian gravitation with Plummer softening: force magnitude.
static bj_real bj_galileo_velocity(bj_real velocity, bj_real acceleration, bj_real time)
Galileo’s uniformly accelerated motion: velocity at time t.
static bj_real bj_galileo_position(bj_real position, bj_real velocity, bj_real acceleration, bj_real time)
Galileo’s uniformly accelerated motion: position at time t.
C99 math shim with bj_real precision type and scalar utilities.
Fixed-size vector types (2D, 3D, 4D) and inline operations.