diff options
-rw-r--r-- | core/src/border.rs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/core/src/border.rs b/core/src/border.rs index 21823341..64262471 100644 --- a/core/src/border.rs +++ b/core/src/border.rs @@ -37,7 +37,19 @@ impl From<f32> for Radius { impl From<u8> for Radius { fn from(w: u8) -> Self { - Self([f32::from(w); 4]) + Self::from(f32::from(w)) + } +} + +impl From<u16> for Radius { + fn from(w: u16) -> Self { + Self::from(f32::from(w)) + } +} + +impl From<i32> for Radius { + fn from(w: i32) -> Self { + Self::from(w as f32) } } |