diff --git a/src/vec.rs b/src/vec.rs index 2016859..31389e6 100644 --- a/src/vec.rs +++ b/src/vec.rs @@ -215,6 +215,18 @@ impl From<(i32, i32, i32, i32)> for Vec4 { } } +impl From<((i32, i32), (i32, i32))> for Vec4 { + fn from(((left, right), (top, bottom)): ((i32, i32), (i32, i32))) -> Vec4 { + (left, right, top, bottom).into() + } +} +impl From<((usize, usize), (usize, usize))> for Vec4 { + fn from(((left, right), (top, bottom)): ((usize, usize), (usize, usize))) + -> Vec4 { + (left, right, top, bottom).into() + } +} + impl> Add for Vec4 { type Output = Vec4;