mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 21:30:03 -04:00
emath: add Rect::signed_distance_to_pos and Vec2::abs
This commit is contained in:
@@ -223,6 +223,12 @@ impl Vec2 {
|
||||
vec2(self.x.ceil(), self.y.ceil())
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
#[inline]
|
||||
pub fn abs(self) -> Self {
|
||||
vec2(self.x.abs(), self.y.abs())
|
||||
}
|
||||
|
||||
/// True if all members are also finite.
|
||||
#[inline(always)]
|
||||
pub fn is_finite(self) -> bool {
|
||||
|
||||
Reference in New Issue
Block a user