impl Mul<&Vec3> for f64

This commit is contained in:
Matthew Gordon 2020-09-12 09:49:22 -04:00
parent 65dd9b5095
commit d4cbcfcb59
1 changed files with 8 additions and 0 deletions

View File

@ -310,6 +310,14 @@ impl Mul<Vec3> for f64 {
} }
} }
impl Mul<&Vec3> for f64 {
type Output = Vec3;
fn mul(self, rhs: &Vec3) -> Vec3 {
rhs * self
}
}
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;