From 643fcb98c0e6cdc63218dd39960d9053b209d9a6 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Tue, 30 Sep 2025 10:56:34 -0500 Subject: 1.21.9 (#235) * start updating to 25w33a * 1.21.9-pre2 * clippy * cleanup, and fix c_explode and c_player_rotation * mc update should be in Changed section in the changelog * 1.21.9 --- azalea-core/src/math.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'azalea-core/src/math.rs') diff --git a/azalea-core/src/math.rs b/azalea-core/src/math.rs index e62a3d23..4d3bf84c 100644 --- a/azalea-core/src/math.rs +++ b/azalea-core/src/math.rs @@ -92,6 +92,11 @@ pub fn sign_as_int(num: f64) -> i32 { if num == 0. { 0 } else { num.signum() as i32 } } +pub fn ceil_long(x: f64) -> i64 { + let x_i64 = x as i64; + if x > x_i64 as f64 { x_i64 + 1 } else { x_i64 } +} + pub fn equal(a: f64, b: f64) -> bool { (b - a).abs() < 1.0e-5 } -- cgit v1.2.3