1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 05:10:03 -04:00

Some minor fixes and additions

This commit is contained in:
Emil Ernerfeldt
2019-11-02 09:50:49 +01:00
parent 1d6bc3baba
commit be8eb02b3f
9 changed files with 21 additions and 7 deletions

View File

@@ -40,6 +40,14 @@ impl Vec2 {
}
}
impl std::ops::Neg for Vec2 {
type Output = Vec2;
fn neg(self) -> Vec2 {
vec2(-self.x, -self.y)
}
}
impl std::ops::AddAssign for Vec2 {
fn add_assign(&mut self, rhs: Vec2) {
*self = Vec2 {