diff options
author | Keuin <[email protected]> | 2022-05-03 15:55:39 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2022-05-03 15:55:39 +0800 |
commit | 038e32a2345b064cb793a8ece77f1eda1bd824b0 (patch) | |
tree | a5565dce9c41db6baaba32e945662071bd994084 | |
parent | 75e13a6039cab6c8bbde5bf6544efcdbfff0f30e (diff) |
Bugfix: range01_scalar does not obey to its contract.
-rw-r--r-- | vec.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -215,7 +215,7 @@ public: // Get a random real number in range [0, 1]. inline T range01_scalar() { - return uni(mt); + return std::abs(uni(mt)); }; // Get a unit vector with random direction. |