mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 05:40:03 -04:00
Drag to re-arrange tabs
This commit is contained in:
@@ -188,6 +188,14 @@ impl Pos2 {
|
||||
y: self.y.clamp(min.y, max.y),
|
||||
}
|
||||
}
|
||||
|
||||
/// Linearly interpolate towards another point, so that `0.0 => self, 1.0 => other`.
|
||||
pub fn lerp(&self, other: Pos2, t: f32) -> Pos2 {
|
||||
Pos2 {
|
||||
x: lerp(self.x..=other.x, t),
|
||||
y: lerp(self.y..=other.y, t),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::ops::Index<usize> for Pos2 {
|
||||
|
||||
Reference in New Issue
Block a user