Relax type of function parameter

This commit is contained in:
Hanno Braun 2025-03-21 22:50:50 +01:00
parent 590425214d
commit b3a354415d
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ impl Plane {
}
pub fn normal(&self) -> Vector<3> {
self.u().cross(self.v()).normalize()
self.u().cross(&self.v()).normalize()
}
pub fn point_from_local(&self, point: impl Into<Point<2>>) -> Point<3> {

View File

@ -28,7 +28,7 @@ impl<const D: usize> Vector<D> {
}
impl Vector<3> {
pub fn cross(self, other: Self) -> Self {
pub fn cross(self, other: &Self) -> Self {
let [ax, ay, az] = self.components;
let [bx, by, bz] = other.components;