vector4i.c file
Functions
- auto vec4i_normalize(vector4i v) -> vector4i
- Normalizes a
vector4ito unit length. -
auto vec4i_lerp(vector4i a,
vector4i b,
vm_
float_ t t) -> vector4i - Linearly interpolates between two
vector4i. -
auto vec4i_length(vector4i v) -> vm_
float_ t - Computes the length (magnitude) of a
vector4i. -
auto vec4i_distance(vector4i a,
vector4i b) -> vm_
float_ t - Computes the Euclidean distance between two
vector4i.
Function documentation
vector4i vec4i_normalize(vector4i v)
Normalizes a vector4i to unit length.
| Parameters | |
|---|---|
| v | The vector (non-zero). |
| Returns | The normalized vector. |
vector4i vec4i_lerp(vector4i a,
vector4i b,
vm_ float_ t t)
Linearly interpolates between two vector4i.
| Parameters | |
|---|---|
| a | Start vector. |
| b | End vector. |
| t | Interpolation factor [0, 1]. |
| Returns | The interpolated vector (a * (1 - t) + b * t). |
vm_ float_ t vec4i_length(vector4i v)
Computes the length (magnitude) of a vector4i.
| Parameters | |
|---|---|
| v | The vector. |
| Returns | The Euclidean length of v. |
vm_ float_ t vec4i_distance(vector4i a,
vector4i b)
Computes the Euclidean distance between two vector4i.
| Parameters | |
|---|---|
| a | First vector. |
| b | Second vector. |
| Returns | The distance between a and b. |