summaryrefslogtreecommitdiffstats
path: root/src/Noise.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-05-01 23:20:00 +0200
committermadmaxoft <github@xoft.cz>2014-05-01 23:20:00 +0200
commit6bdd3ee35e85768634e41af86a99bbdd933ffb3a (patch)
tree5481ae6b270a197f4a57341dfc42fb98343022b0 /src/Noise.h
parentMerge branch 'master' into SslWebAdmin (diff)
parentFixed a warning in Noise. (diff)
downloadcuberite-6bdd3ee35e85768634e41af86a99bbdd933ffb3a.tar
cuberite-6bdd3ee35e85768634e41af86a99bbdd933ffb3a.tar.gz
cuberite-6bdd3ee35e85768634e41af86a99bbdd933ffb3a.tar.bz2
cuberite-6bdd3ee35e85768634e41af86a99bbdd933ffb3a.tar.lz
cuberite-6bdd3ee35e85768634e41af86a99bbdd933ffb3a.tar.xz
cuberite-6bdd3ee35e85768634e41af86a99bbdd933ffb3a.tar.zst
cuberite-6bdd3ee35e85768634e41af86a99bbdd933ffb3a.zip
Diffstat (limited to 'src/Noise.h')
-rw-r--r--src/Noise.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Noise.h b/src/Noise.h
index 62004503f..e605051b5 100644
--- a/src/Noise.h
+++ b/src/Noise.h
@@ -280,7 +280,7 @@ NOISE_DATATYPE cNoise::CubicInterpolate(NOISE_DATATYPE a_A, NOISE_DATATYPE a_B,
NOISE_DATATYPE cNoise::CosineInterpolate(NOISE_DATATYPE a_A, NOISE_DATATYPE a_B, NOISE_DATATYPE a_Pct)
{
const NOISE_DATATYPE ft = a_Pct * (NOISE_DATATYPE)3.1415927;
- const NOISE_DATATYPE f = (1 - cos(ft)) * (NOISE_DATATYPE)0.5;
+ const NOISE_DATATYPE f = (NOISE_DATATYPE)((NOISE_DATATYPE)(1 - cos(ft)) * (NOISE_DATATYPE)0.5);
return a_A * (1 - f) + a_B * f;
}