Fixed fast floor in NoiseGenerator
This commit is contained in:
parent
fb594732b5
commit
d894e11b51
@ -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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user