mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Pixel-perfect fonts
This commit is contained in:
@@ -28,10 +28,10 @@ impl Vec2 {
|
||||
}
|
||||
|
||||
impl std::ops::AddAssign for Vec2 {
|
||||
fn add_assign(&mut self, other: Vec2) {
|
||||
fn add_assign(&mut self, rhs: Vec2) {
|
||||
*self = Vec2 {
|
||||
x: self.x + other.x,
|
||||
y: self.y + other.y,
|
||||
x: self.x + rhs.x,
|
||||
y: self.y + rhs.y,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -56,6 +56,13 @@ impl std::ops::Sub for Vec2 {
|
||||
}
|
||||
}
|
||||
|
||||
impl std::ops::MulAssign<f32> for Vec2 {
|
||||
fn mul_assign(&mut self, rhs: f32) {
|
||||
self.x *= rhs;
|
||||
self.y *= rhs;
|
||||
}
|
||||
}
|
||||
|
||||
impl std::ops::Mul<f32> for Vec2 {
|
||||
type Output = Vec2;
|
||||
fn mul(self, factor: f32) -> Vec2 {
|
||||
|
||||
Reference in New Issue
Block a user