Skip to content

CF_V4

Category: math
GitHub: cute_math3d.h


A 4d vector, typically a homogeneous point or a color.

Struct Members Description
float x The x component.
float y The y component.
float z The z component.
float w The w component.

Remarks

Construct one with cf_v4, which splats a single argument or takes all four:

CF_V4 a = cf_v4(0.0f);                        // { 0, 0, 0, 0 }
CF_V4 b = cf_v4(1.0f, 2.0f, 3.0f, 1.0f);

The C++ API uses V4(x, y, z, w). Use cf_v4_from_v3 to extend a CF_V3 with an explicit w, and cf_xyz to truncate back down.

CF_V3
cf_dot
CF_M4x4
cf_v4
cf_v4_from_v3
cf_mul