diff options
author | Samuel Bronson <naesten@gmail.com> | 2013-03-04 14:34:56 -0500 |
---|---|---|
committer | Samuel Bronson <naesten@gmail.com> | 2013-03-04 14:34:56 -0500 |
commit | 8520d3c388088184519517eefcdff7755a357c40 (patch) | |
tree | 1e1a1c8e5ed16162e05ea5260291873695004815 /crawl-ref/source/perlin.cc | |
parent | b34b6208d5a8bdaa0a465c759b7983376a790a55 (diff) | |
download | crawl-ref-8520d3c388088184519517eefcdff7755a357c40.tar.gz crawl-ref-8520d3c388088184519517eefcdff7755a357c40.zip |
Add some comments to perlin.cc.
Diffstat (limited to 'crawl-ref/source/perlin.cc')
-rw-r--r-- | crawl-ref/source/perlin.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/crawl-ref/source/perlin.cc b/crawl-ref/source/perlin.cc index 1266319b47..54d1b254c9 100644 --- a/crawl-ref/source/perlin.cc +++ b/crawl-ref/source/perlin.cc @@ -1,6 +1,10 @@ /* * This is a C++ port of version Stefan Gustavson's public domain - * implementation of simplex noise (Version 2012-03-09). + * implementation of simplex noise (Version 2012-03-09), which can be + * found at <http://webstaff.itn.liu.se/~stegu/simplexnoise/>. + * + * (Simplex Noise is a new (2001) algorithm created by Ken Perlin to + * replace his classic "Perlin" noise algorithm.) * * It was ported by Brendan Hickey (brendan@bhickey.net) and released on * 2012-09-16. @@ -31,7 +35,7 @@ namespace perlin { // Inner class to speed upp gradient computations - // (array access is a lot slower than member access) + // ([in Java,] array access is a lot slower than member access) class Grad { public: const double x, y, z, w; @@ -366,6 +370,8 @@ namespace perlin return 27.0 * (n0 + n1 + n2 + n3 + n4); } + // This is *not* in Stefan Gustavson's Java original + // FIXME: what does it do? double fBM(double x, double y, double z, uint32_t octaves) { if (octaves < 1) return 0.0; |