solidc
Robust collection of general-purpose cross-platform C libraries and data structures designed for rapid and safe development in C
Loading...
Searching...
No Matches
Functions
matrix.h File Reference

Matrix operations and mathematical utilities. More...

#include "vec.h"
#include <float.h>
#include <stdbool.h>
#include <stdio.h>
Include dependency graph for matrix.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

struct ALIGN (16) Mat3
 3D vector compute type (16 bytes, 16-byte aligned).
 

Detailed Description

Matrix operations and mathematical utilities.

Definition in file matrix.h.

Function Documentation

◆ ALIGN()

union ALIGN ( 16  )

3D vector compute type (16 bytes, 16-byte aligned).

4D vector compute type (16 bytes, 16-byte aligned).

Memory Layout:

  • [0]: x component (used)
  • [1]: y component (used)
  • [2]: z component (used)
  • [3]: w component (padding, zero-initialized)

The W component acts as padding to maintain 128-bit alignment and is kept at zero for safety when accidentally using 4D operations.

Memory Layout:

  • [0]: x component (used)
  • [1]: y component (used)
  • [2]: z component (used)
  • [3]: w component (used)

All components are active. Commonly used for:

  • RGBA colors
  • Quaternions
  • Homogeneous coordinates (x, y, z, w=1.0)
  • 4D transformations

Definition at line 1 of file matrix.h.

References simd_transpose4, Vec3::x, Vec3::y, and Vec3::z.