src/vector4i_ptr.c file

Functions

void vec4i_normalize_ptr(vector4i* res, const vector4i* v)
Normalizes a vector4i by dividing its components by the vector length and stores the result in res.
void vec4i_lerp_ptr(vector4i* res, const vector4i* a, const vector4i* b, vm_float_t t)
Linearly interpolates between two vector4i using an interpolation factor t (clamped to [0,1]) and stores the result in res.

Function documentation

void vec4i_normalize_ptr(vector4i* res, const vector4i* v)

Normalizes a vector4i by dividing its components by the vector length and stores the result in res.

Parameters
res Pointer to result vector
v Pointer to input vector

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

void vec4i_lerp_ptr(vector4i* res, const vector4i* a, const vector4i* b, vm_float_t t)

Linearly interpolates between two vector4i using an interpolation factor t (clamped to [0,1]) and stores the result in res.

Parameters
res Pointer to result vector
a Pointer to first vector
b Pointer to second vector
t Interpolation factor