math: fix lerp reference

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2023-09-09 19:24:03 -07:00
parent fe517f3efb
commit 77b95aa9a9

View file

@ -212,7 +212,7 @@ pub fn Vec(comptime n_value: usize, comptime Scalar: type) type {
/// a.lerp(b, 1.0) == b /// a.lerp(b, 1.0) == b
/// ``` /// ```
pub inline fn lerp(a: *const VecN, b: *const VecN, amount: Scalar) VecN { pub inline fn lerp(a: *const VecN, b: *const VecN, amount: Scalar) VecN {
return a.mulScalar(1.0 - amount).add(b.mulScalar(amount)); return a.mulScalar(1.0 - amount).add(&b.mulScalar(amount));
} }
/// Calculates the dot product between vector a and b and returns scalar. /// Calculates the dot product between vector a and b and returns scalar.