Fixed fast floor in NoiseGenerator

This commit is contained in:
Dinnerbone 2011-07-18 18:19:43 +01:00
parent fb594732b5
commit d894e11b51

View File

@ -17,7 +17,7 @@ public abstract class NoiseGenerator {
* @return Floored value * @return Floored value
*/ */
public static int floor(double x) { public static int floor(double x) {
return (int)Math.floor(x); return x >= 0 ? (int) x : (int) x - 1;
} }
protected static double fade(double x) { protected static double fade(double x) {