diff options
-rw-r--r-- | vec.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -234,6 +234,11 @@ public: } } + // Get a random real number in range [0, 1]. + inline T range01_scalar() { + return uni(mt); + }; + // Get a unit vector with random direction. inline vec3<T> normalized() { return range01().unit_vec(); |