From 8dc4de0bd172c94af8578a3406bbb84c037f5df2 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Wed, 4 Dec 2024 12:23:19 -0600 Subject: [PATCH] Begin slimming down `PointLike`. --- src/core.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/core.rs b/src/core.rs index 316a288..d70e236 100644 --- a/src/core.rs +++ b/src/core.rs @@ -333,6 +333,16 @@ impl PointLike for Vec2 { } } +impl PointLike for IVec2 { + fn x(&self) -> f32 { + self.x as f32 + } + + fn y(&self) -> f32 { + self.y as f32 + } +} + impl PointLike for (i32, i32) { fn x(&self) -> f32 { self.0 as f32