From 4f762c7df957f263f33d172bf44f1a74d9bbafb4 Mon Sep 17 00:00:00 2001 From: Stephan Rehfeld Date: Wed, 17 Jun 2026 18:24:15 +0200 Subject: [PATCH] Pre Macro Implementation --- src/math.rs | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/math.rs b/src/math.rs index b787954..bd5837e 100644 --- a/src/math.rs +++ b/src/math.rs @@ -46,14 +46,29 @@ where } } -/* -impl Mul> for f64 { - type Output = Vector3; +impl Mul> for f64 { + type Output = Vector3; - fn mul(self, rhs: Vector3) -> Self::Output { + fn mul(self, rhs: Vector3) -> Self::Output { Vector3::new(self * rhs.x, self * rhs.y, self * rhs.z) } -}*/ +} + +impl Mul> for f32 { + type Output = Vector3; + + fn mul(self, rhs: Vector3) -> Self::Output { + Vector3::new(self * rhs.x, self * rhs.y, self * rhs.z) + } +} + +impl Mul> for i32 { + type Output = Vector3; + + fn mul(self, rhs: Vector3) -> Self::Output { + Vector3::new(self * rhs.x, self * rhs.y, self * rhs.z) + } +} impl Mul for Vector3 where