src/vector3i_ptr.c file

Functions

void vec3i_normalize_ptr(vector3i* res, const vector3i* v)
Normalizes a vector3i to approximate unit length.
void vec3i_lerp_ptr(vector3i* res, const vector3i* a, const vector3i* b, vm_float_t t)
Performs linear interpolation between two vector3i.
void vec3i_normalize_to_vec3_ptr(vector3* res, const vector3i* v)
Converts to a unit-length vector3.

Function documentation

void vec3i_normalize_ptr(vector3i* res, const vector3i* v)

Normalizes a vector3i to approximate unit length.

Parameters
res Pointer to the vector that will store the result.
v Pointer to the input vector.

If the vector length is zero, copies the input vector.

void vec3i_lerp_ptr(vector3i* res, const vector3i* a, const vector3i* b, vm_float_t t)

Performs linear interpolation between two vector3i.

Parameters
res Pointer to the vector that will store the result.
a Pointer to the start vector.
b Pointer to the end vector.
t Interpolation factor (typically between 0.0 and 1.0).

void vec3i_normalize_to_vec3_ptr(vector3* res, const vector3i* v)

Converts to a unit-length vector3.

Parameters
res Output vector.
v Input vector.