diff options
author | John Wigg <31868812+CaptainProton42@users.noreply.github.com> | 2021-09-24 21:41:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-24 21:41:17 +0200 |
commit | ccf05aeb9a6fec3382398dd41cb1334bef3740e3 (patch) | |
tree | bb7cfd18281d71e431784bf292b3f413ca00b3aa | |
parent | 89c718c58b4fe5c98ea188fa9980711d1703442c (diff) |
Fix Face3::get_random_point_inside()
Use correct overload of Math::random(from, to) to return floating point values within the correct range.
-rw-r--r-- | core/math/face3.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/math/face3.cpp b/core/math/face3.cpp index 9af3f868d2..045ab67ce8 100644 --- a/core/math/face3.cpp +++ b/core/math/face3.cpp @@ -151,8 +151,8 @@ Face3::Side Face3::get_side_of(const Face3 &p_face, ClockDirection p_clock_dir) } Vector3 Face3::get_random_point_inside() const { - real_t a = Math::random(0, 1); - real_t b = Math::random(0, 1); + real_t a = Math::random(0.0, 1.0); + real_t b = Math::random(0.0, 1.0); if (a > b) { SWAP(a, b); } |