Added ImVec2::zero() for convenience.

This commit is contained in:
Cameron Hart 2016-12-30 16:29:47 +11:00
parent bb0d712cac
commit 0254b7cbe7

View File

@ -321,6 +321,12 @@ impl ImVec2 {
y: y as c_float,
}
}
pub fn zero() -> ImVec2 {
ImVec2 {
x: 0.0 as c_float,
y: 0.0 as c_float,
}
}
}
impl From<[f32; 2]> for ImVec2 {