Add PointLike
implementation for GlobalTransform
.
This commit is contained in:
parent
13d1cb0734
commit
0a141f078b
10
src/core.rs
10
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user