summaryrefslogtreecommitdiffstats
path: root/src/Noise.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-05-01 23:10:37 +0200
committermadmaxoft <github@xoft.cz>2014-05-01 23:10:37 +0200
commitcb07541029bbce8a2bd46a58850af20687588978 (patch)
tree0c468a25ea3363f537dc22f46dfdbf5d0f5344cd /src/Noise.h
parentMore ClientHandle fixes. (diff)
downloadcuberite-cb07541029bbce8a2bd46a58850af20687588978.tar
cuberite-cb07541029bbce8a2bd46a58850af20687588978.tar.gz
cuberite-cb07541029bbce8a2bd46a58850af20687588978.tar.bz2
cuberite-cb07541029bbce8a2bd46a58850af20687588978.tar.lz
cuberite-cb07541029bbce8a2bd46a58850af20687588978.tar.xz
cuberite-cb07541029bbce8a2bd46a58850af20687588978.tar.zst
cuberite-cb07541029bbce8a2bd46a58850af20687588978.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;
}