Add PointLike implementation for GlobalTransform.

This commit is contained in:
Nolan Darilek 2022-05-11 13:34:03 -05:00
parent 13d1cb0734
commit 0a141f078b

View File

@ -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