LibJuno 1.0.1
LibJuno is a lightweight C11 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
juno_math.h File Reference

Convenience header: math types plus inline vector/quaternion ops. More...

#include "juno_math_types.h"
#include "juno_vec.h"
#include <stdint.h>
Include dependency graph for juno_math.h:

Go to the source code of this file.

Detailed Description

Convenience header: math types plus inline vector/quaternion ops.

Umbrella include that aggregates:

  • juno_math_types.h — structural type definitions (vectors, matrices, real quaternions)
  • juno_vec.h — inline operations (add/sub/scale, dot/cross, norms, quaternion algebra)

Use this header when you want both the math types and the inline utilities in one place. If you only need type definitions without inline operations, prefer juno_math_types.h.

Quaternions use the component order [s, i, j, k] and the Hamilton product follows the right-handed convention (i^2 = j^2 = k^2 = ijk = -1). See Juno_RQuat_F64_HamProd in juno_vec.h for the exact formula.

JUNO_VEC3_F64_T a = {{1.0, 2.0, 3.0}};
JUNO_VEC3_F64_T b = {{4.0, 5.0, 6.0}};
JUNO_VEC3_F64_T c = Juno_Vec3_F64_Add(a, b); // {5, 7, 9}
Convenience header: math types plus inline vector/quaternion ops.
static JUNO_VEC3_F64_T Juno_Vec3_F64_Add(JUNO_VEC3_F64_T tVec0, JUNO_VEC3_F64_T tVec1)
Add two 3D vectors (double).
Definition juno_vec.h:246
3D vector union supporting Cartesian, spherical, and array access (double precision).
Definition juno_vec_types.h:264