From 0a141f078bb6b5379c26b5d29385be44f553c9ed Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Wed, 11 May 2022 13:34:03 -0500 Subject: [PATCH] Add `PointLike` implementation for `GlobalTransform`. --- src/core.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/core.rs b/src/core.rs index b0e2d8f..28918c9 100644 --- a/src/core.rs +++ b/src/core.rs @@ -378,6 +378,16 @@ impl PointLike for &Transform { } } +impl PointLike for GlobalTransform { + fn x(&self) -> f32 { + self.translation.x + } + + fn y(&self) -> f32 { + self.translation.y + } +} + impl PointLike for Vec2 { fn x(&self) -> f32 { self.x