]> git.lizzy.rs Git - dragonfireclient.git/commit - src/noise.cpp
Noise: Fix PcgRandom::randNormalDist() when range contains negative numbers
authorkwolekr <kwolekr@minetest.net>
Mon, 27 Apr 2015 08:05:25 +0000 (04:05 -0400)
committerkwolekr <kwolekr@minetest.net>
Mon, 27 Apr 2015 08:05:25 +0000 (04:05 -0400)
commit415167b228dea8b4108d7fe164c7fec8c061dcf5
tree47f147beffc37d4d08c341f50825ce9edc1e6b17
parentcd1d625ab21e741e91be7d2190bb4fd59fab3200
Noise: Fix PcgRandom::randNormalDist() when range contains negative numbers

This fixes an issue with erroneous float-to-int rounding that resulted in
truncation toward 0, causing a biased distribution.
src/noise.cpp