1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 05:10:03 -04:00

Add emath::OrderedFloat (moved from epaint::util::OrderedFloat) (#4389)

It makes much more sense in `emath`
This commit is contained in:
Emil Ernerfeldt
2024-04-21 20:36:32 +02:00
committed by GitHub
parent 46b241eb94
commit 87b294534e
14 changed files with 57 additions and 90 deletions

View File

@@ -26,6 +26,7 @@ impl std::ops::IndexMut<usize> for Rgba {
}
}
/// Deterministically hash an `f32`, treating all NANs as equal, and ignoring the sign of zero.
#[inline]
pub(crate) fn f32_hash<H: std::hash::Hasher>(state: &mut H, f: f32) {
if f == 0.0 {