1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 22:30:03 -04:00

Shrink the byte-size of Response slightly (#8011)

Small optimization! 96 -> 88 bytes, so no huge win.
This commit is contained in:
Emil Ernerfeldt
2026-03-24 15:46:56 +01:00
committed by GitHub
parent 5ed92c3011
commit a1af9abe70
7 changed files with 57 additions and 23 deletions

View File

@@ -119,6 +119,11 @@ impl Pos2 {
/// Same as `Pos2::default()`.
pub const ZERO: Self = Self { x: 0.0, y: 0.0 };
pub const NAN: Self = Self {
x: f32::NAN,
y: f32::NAN,
};
#[inline(always)]
pub const fn new(x: f32, y: f32) -> Self {
Self { x, y }