Small changes to C API unit tests.

- (1) Changed randomized math structure values to predefined values to prevent cases that could potentially lead to division by zero.
- (2) Removed unused variable(s) due to (1).
- (3) Renamed variable(s) for better clarity.
This commit is contained in:
Marc-Antoine Lortie
2020-04-13 14:13:54 -04:00
parent ac16a857ff
commit e399a12f71
7 changed files with 52 additions and 35 deletions
+2 -5
View File
@@ -47,13 +47,10 @@ namespace Assimp {
// Initialize epsilon value.
const float AssimpMathTest::Epsilon = Math::getEpsilon<float>();
// Initialize with an interval of [1,100] to avoid null values.
RandomUniformFloatGenerator AssimpMathTest::Rand(1.0f, 100.0f);
// Initialize with an interval of [1,100].
RandomUniformFloatGenerator AssimpMathTest::RandNonZero(1.0f, 100.0f);
// Initialize with an interval of [-PI,PI] inclusively.
RandomUniformFloatGenerator AssimpMathTest::RandPI(-Math::PI<float>(), Math::PI<float>());
// Initialize with an interval of [0,1] inclusively.
RandomUniformFloatGenerator AssimpMathTest::RandUnit(0.0f, 1.0f);
}