From ccf05aeb9a6fec3382398dd41cb1334bef3740e3 Mon Sep 17 00:00:00 2001 From: John Wigg <31868812+CaptainProton42@users.noreply.github.com> Date: Fri, 24 Sep 2021 21:41:17 +0200 Subject: Fix Face3::get_random_point_inside() Use correct overload of Math::random(from, to) to return floating point values within the correct range. --- core/math/face3.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core') 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); } -- cgit v1.2.3