summaryrefslogtreecommitdiffstats
path: root/Tests/NoiseTest/NoiseTest.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-17 22:57:05 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-17 22:57:05 +0200
commita4be800a91949d0920b9fa51a71644d120d67fb6 (patch)
tree8c80b8f662af4bcf99527fe6c2ea8bab8ce2d8ec /Tests/NoiseTest/NoiseTest.cpp
parentMaking float the default datatype for noise calculation (it's faster on ARM and same-speed on x86) (diff)
downloadcuberite-a4be800a91949d0920b9fa51a71644d120d67fb6.tar
cuberite-a4be800a91949d0920b9fa51a71644d120d67fb6.tar.gz
cuberite-a4be800a91949d0920b9fa51a71644d120d67fb6.tar.bz2
cuberite-a4be800a91949d0920b9fa51a71644d120d67fb6.tar.lz
cuberite-a4be800a91949d0920b9fa51a71644d120d67fb6.tar.xz
cuberite-a4be800a91949d0920b9fa51a71644d120d67fb6.tar.zst
cuberite-a4be800a91949d0920b9fa51a71644d120d67fb6.zip
Diffstat (limited to '')
-rw-r--r--Tests/NoiseTest/NoiseTest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Tests/NoiseTest/NoiseTest.cpp b/Tests/NoiseTest/NoiseTest.cpp
index a5d13a235..eae024f2f 100644
--- a/Tests/NoiseTest/NoiseTest.cpp
+++ b/Tests/NoiseTest/NoiseTest.cpp
@@ -43,7 +43,7 @@ clock_t TestCubicNoise(void)
clock_t Begin = clock();
for (int i = 0; i < 1000; i++)
{
- Cubic.Generate2D(Values, 256, 256, 0, 25.6, 0, 25.6);
+ Cubic.Generate2D(Values, 256, 256, 0, (NOISE_DATATYPE)25.6, 0, (NOISE_DATATYPE)25.6);
}
clock_t Ticks = clock() - Begin;
LOG("cCubicNoise generating 1000 * 256x256 values took %d ticks (%.02f sec)", Ticks, (double)Ticks / CLOCKS_PER_SEC);
@@ -96,5 +96,6 @@ int main(int argc, char * argv[])
clock_t NewTicks = TestCubicNoise();
clock_t OldTicks = TestOldNoise();
LOG("New method is %.02fx faster", (double)OldTicks / NewTicks);
+ LOG("Press Enter to quit program");
getchar();
}