diff options
author | PilzAdam <adam-k@outlook.com> | 2012-11-02 08:35:30 -0700 |
---|---|---|
committer | PilzAdam <adam-k@outlook.com> | 2012-11-02 08:35:30 -0700 |
commit | 8adad36a667bd9dc0bd2c0955858cb3a1883ea05 (patch) | |
tree | 943645eba49c0f13be795a43cee560401a673d6b /src/mapgen.cpp | |
parent | 63e73f29cc9aa43721a84e48072607fc1d913877 (diff) | |
parent | b701f8a878b7c76a33d7c3540a4b5e9c6e6b31ac (diff) | |
download | minetest-8adad36a667bd9dc0bd2c0955858cb3a1883ea05.tar.gz minetest-8adad36a667bd9dc0bd2c0955858cb3a1883ea05.tar.bz2 minetest-8adad36a667bd9dc0bd2c0955858cb3a1883ea05.zip |
Merge pull request #272 from PilzAdam/pow
Replace pow() with multiplikation to improve speed
Diffstat (limited to 'src/mapgen.cpp')
-rw-r--r-- | src/mapgen.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mapgen.cpp b/src/mapgen.cpp index 67e92f449..77b133020 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -1228,7 +1228,7 @@ double base_rock_level_2d(u64 seed, v2s16 p) 0.5+(float)p.X/125., 0.5+(float)p.Y/125., seed-932, 5, 0.7); b = rangelim(b, 0.0, 1000.0); - b = pow(b, 7); + b = b*b*b*b*b*b*b; b *= 5; b = rangelim(b, 0.5, 1000.0); // Values 1.5...100 give quite horrible looking slopes |