1
0
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:
Emil Ernerfeldt
2019-01-19 10:10:28 -06:00
parent cd8ca47e76
commit c2c94ddda5
14 changed files with 207 additions and 212 deletions

View File

@@ -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 {