math: Fix Vec cross method calculation arguments
This commit is contained in:
parent
085974a4b2
commit
0bd8690ee1
1 changed files with 3 additions and 3 deletions
|
|
@ -57,9 +57,9 @@ pub fn Vec(comptime n_value: usize, comptime Scalar: type) type {
|
|||
/// and required inputs are Vec3.
|
||||
pub inline fn cross(a: *const VecN, b: *const VecN) VecN {
|
||||
// https://gamemath.com/book/vectors.html#cross_product
|
||||
const s1 = a.yzx().mul(b.zxy());
|
||||
const s2 = a.zxy().mul(b.yzx());
|
||||
return s1.sub(s2);
|
||||
const s1 = a.yzx().mul(&b.zxy());
|
||||
const s2 = a.zxy().mul(&b.yzx());
|
||||
return s1.sub(&s2);
|
||||
}
|
||||
},
|
||||
inline 4 => struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue