Skip to content

Commit

Permalink
Remove Add and Sub operators in according to bevyengine#6134
Browse files Browse the repository at this point in the history
  • Loading branch information
Weibye committed Nov 6, 2022
1 parent 7ff2086 commit 41d896e
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions crates/bevy_ui/src/geometry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,42 +411,6 @@ impl From<(Val, Val)> for Size {
}
}

impl Add<Vec2> for Size {
type Output = Size;

fn add(self, rhs: Vec2) -> Self::Output {
Self {
width: self.width + rhs.x,
height: self.height + rhs.y,
}
}
}

impl AddAssign<Vec2> for Size {
fn add_assign(&mut self, rhs: Vec2) {
self.width += rhs.x;
self.height += rhs.y;
}
}

impl Sub<Vec2> for Size {
type Output = Size;

fn sub(self, rhs: Vec2) -> Self::Output {
Self {
width: self.width - rhs.x,
height: self.height - rhs.y,
}
}
}

impl SubAssign<Vec2> for Size {
fn sub_assign(&mut self, rhs: Vec2) {
self.width -= rhs.x;
self.height -= rhs.y;
}
}

impl Mul<f32> for Size {
type Output = Size;

Expand Down

0 comments on commit 41d896e

Please sign in to comment.