Begin slimming down PointLike
.
This commit is contained in:
parent
2379ee6900
commit
8dc4de0bd1
10
src/core.rs
10
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) {
|
impl PointLike for (i32, i32) {
|
||||||
fn x(&self) -> f32 {
|
fn x(&self) -> f32 {
|
||||||
self.0 as f32
|
self.0 as f32
|
||||||
|
|
Loading…
Reference in New Issue
Block a user