Skip to content

cf_v4_from_v3

Category: math
GitHub: cute_math3d.h


Extends a CF_V3 into a CF_V4 with an explicit w component.

CF_V4 cf_v4_from_v3(CF_V3 a, float w) { return cf_v4(a.x, a.y, a.z, w); }
Parameters Description
a The 3d vector.
w The w component. Use 1 for a point, 0 for a direction.

Return Value

Returns { a.x, a.y, a.z, w }.

CF_V4
CF_V3
cf_v4
cf_xyz