mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-23 17:35:00 +00:00
Implement From<(u16,u16)> for Vec2
This commit is contained in:
parent
7244896263
commit
c1d979b91c
@ -162,6 +162,12 @@ impl From<(u8, u8)> for XY<usize> {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<(u16, u16)> for XY<usize> {
|
||||
fn from((x, y): (u16, u16)) -> Self {
|
||||
(x as usize, y as usize).into()
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Add<Output = T>, O: Into<XY<T>>> Add<O> for XY<T> {
|
||||
type Output = Self;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user