From 400d2f91708c1d4598630da2f60758fa6ad2613e Mon Sep 17 00:00:00 2001 From: Mubelotix Date: Sun, 19 Nov 2023 00:42:37 +0100 Subject: [PATCH] Update minecraft-server/src/world/collisions.rs Co-authored-by: DimitriTimoz <45998396+DimitriTimoz@users.noreply.github.com> --- minecraft-server/src/world/collisions.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/minecraft-server/src/world/collisions.rs b/minecraft-server/src/world/collisions.rs index 407d36d0..723684a9 100644 --- a/minecraft-server/src/world/collisions.rs +++ b/minecraft-server/src/world/collisions.rs @@ -2,10 +2,10 @@ use super::*; /// Returns minimum of two floats, but not NaN fn min2(a: f64, b: f64) -> f64 { - if a < b || b.is_nan() { - a - } else { + if a > b { b + } else { + a } }