summaryrefslogtreecommitdiff
path: root/vec.h
diff options
context:
space:
mode:
Diffstat (limited to 'vec.h')
-rw-r--r--vec.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/vec.h b/vec.h
index 13e87b5..99f5f46 100644
--- a/vec.h
+++ b/vec.h
@@ -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.