From 336e603a61b89a1aac0225925081b96e0a6a38f7 Mon Sep 17 00:00:00 2001 From: badlogicgames Date: Tue, 21 Dec 2010 13:24:19 +0000 Subject: [PATCH] [fixed] rounding issues in MathUtils.ceil(). Thanks BurningHand! --- gdx/src/com/badlogic/gdx/utils/MathUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdx/src/com/badlogic/gdx/utils/MathUtils.java b/gdx/src/com/badlogic/gdx/utils/MathUtils.java index 652e46d88..df28be298 100644 --- a/gdx/src/com/badlogic/gdx/utils/MathUtils.java +++ b/gdx/src/com/badlogic/gdx/utils/MathUtils.java @@ -161,7 +161,7 @@ public class MathUtils { static private final int BIG_ENOUGH_INT = 16 * 1024; static private final double BIG_ENOUGH_FLOOR = BIG_ENOUGH_INT; - static private final double BIG_ENOUGH_CEIL = BIG_ENOUGH_INT + 0.5; + static private final double BIG_ENOUGH_CEIL = BIG_ENOUGH_INT + 0.99999999; static public int floor (float x) { return (int)(x + BIG_ENOUGH_FLOOR) - BIG_ENOUGH_INT; -- 2.11.0