-
-Here are the types it provides to the developer:
+Combined with `Vec10` and the separate `Fast` variants, the header reads like an interface designed around compact integer storage and predictable performance on DS-era hardware.
+
+{% capture ds_vector_types_tab %}
+Here are the main storage types exposed by the header:
```c
#define vl volatile
-// 10-bit (slightly unusual to use 10-bits!)
+// 10-bit packed coordinates
typedef struct {
s32 x:10;
s32 y:10;
@@ -61,12 +254,12 @@ typedef struct {
typedef vl Pos10 vPos10;
typedef vl Vec10 vVec10;
-// 16-bit
+// 16-bit
typedef struct {
s16 x;
s16 y;
s16 z;
- s16 w;
+ s16 w;
} Vec16, Vec, Pos16, TestPos;
typedef vl Pos16 vPos16;
typedef vl Vec16 vVec16;
@@ -83,12 +276,10 @@ typedef vl Pos32 vPos32;
typedef vl Pos vPos;
```
-
-
-
-Here are a few of the functions it provides:
+{% endcapture %}
+
+{% capture ds_vector_functions_tab %}
+Here are the main vector helpers exposed by the header:
```c
void VEC_Copy2Vec10(const Vec *srcp, Vec10 *dstp);
@@ -114,15 +305,11 @@ void VEC32_Normalize( Vec32 *srcp, Vec32 *dstp);
void VEC32_Normalize2Vec(Vec32 *srcp, Vec *dstp);
void VEC_Add(Vec *a, Vec *b, Vec *ab);
-
void VEC_Sub(Vec *a, Vec *b, Vec *a_b);
-
void VEC_Scale(Vec *srcp, Vec *dstp, s32 scale);
-
void VEC_Reverse(const Vec *srcp, Vec *dstp);
u32 VEC_Magnitude(const Vec *v);
-
u32 VEC_SquareMagnitude(const Vec *v);
u32 VEC_Distance(const Vec *a, const Vec *b);
@@ -133,10 +320,264 @@ void VEC32_Lerp(Vec32 *a, Vec32 *b, Vec32 *d, s32 t);
void VEC32_LerpFast(Vec32 *a, Vec32 *b, Vec32 *d, s32 t);
```
-
-