math: add initial Quaternion implementation (#1000)
This commit is contained in:
parent
b7ad36078f
commit
93357bd358
2 changed files with 420 additions and 2 deletions
|
|
@ -217,7 +217,7 @@ pub fn Vec(comptime n_value: usize, comptime Scalar: type) type {
|
|||
|
||||
/// Calculates the dot product between vector a and b and returns scalar.
|
||||
pub inline fn dot(a: *const VecN, b: *const VecN) Scalar {
|
||||
return .{ .v = @reduce(.Add, a.v * b.v) };
|
||||
return @reduce(.Add, a.v * b.v);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue