瀏覽代碼

Change from (int division -> cast) to (cast -> float division)

Hanif Bin Ariffin 5 年之前
父節點
當前提交
7db6475592
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      test/unit/utMatrix3x3.cpp

+ 1 - 1
test/unit/utMatrix3x3.cpp

@@ -74,7 +74,7 @@ TEST_F(utMatrix3x3Test, FromToMatrixTest) {
     aiVector3D from, to;
 
     auto random_ratio = []() -> float {
-        return static_cast<float>(rand() / RAND_MAX);
+        return static_cast<float>(rand()) / static_cast<float>(RAND_MAX);
     };
 
     for (int i = 0; i < NUM_SAMPLES; ++i) {