math: Fix Vec swizzling method component calls

This commit is contained in:
Joel D. Schüller 2023-09-23 05:17:25 +02:00 committed by Stephen Gutekanst
parent 8613ba9b17
commit 085974a4b2

View file

@ -46,8 +46,8 @@ pub fn Vec(comptime n_value: usize, comptime Scalar: type) type {
}
// TODO(math): come up with a better strategy for swizzling?
pub inline fn yzw(v: *const VecN) VecN {
return VecN.init(v.y(), v.z(), v.w());
pub inline fn yzx(v: *const VecN) VecN {
return VecN.init(v.y(), v.z(), v.x());
}
pub inline fn zxy(v: *const VecN) VecN {
return VecN.init(v.z(), v.x(), v.y());