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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user