From 7db6475592ef1c0d34227c2a7c682c3d4a63cac2 Mon Sep 17 00:00:00 2001 From: Hanif Bin Ariffin Date: Fri, 29 May 2020 11:59:28 -0400 Subject: [PATCH] Change from (int division -> cast) to (cast -> float division) --- test/unit/utMatrix3x3.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/utMatrix3x3.cpp b/test/unit/utMatrix3x3.cpp index 12a84e0fa..3905b1d35 100644 --- a/test/unit/utMatrix3x3.cpp +++ b/test/unit/utMatrix3x3.cpp @@ -74,7 +74,7 @@ TEST_F(utMatrix3x3Test, FromToMatrixTest) { aiVector3D from, to; auto random_ratio = []() -> float { - return static_cast(rand() / RAND_MAX); + return static_cast(rand()) / static_cast(RAND_MAX); }; for (int i = 0; i < NUM_SAMPLES; ++i) {