Keys interpolation fix
authorAndrzejKozik <AndrzejKozik@users.noreply.github.com>
Fri, 4 Nov 2016 07:48:14 +0000 (08:48 +0100)
committerGitHub <noreply@github.com>
Fri, 4 Nov 2016 07:48:14 +0000 (08:48 +0100)
In line 3073 there was an unproper scope of cast to double.

code/FBXConverter.cpp

index 1f6274d..4de8806 100644 (file)
@@ -3070,7 +3070,7 @@ void Converter::InterpolateKeys( aiVectorKey* valOut, const KeyTimeList& keys, c
 
             // do the actual interpolation in double-precision arithmetics
             // because it is a bit sensitive to rounding errors.
-            const double factor = timeB == timeA ? 0. : static_cast<double>( ( time - timeA ) / ( timeB - timeA ) );
+            const double factor = timeB == timeA ? 0. : static_cast<double>( ( time - timeA ) ) / ( timeB - timeA );
             const ai_real interpValue = static_cast<ai_real>( valueA + ( valueB - valueA ) * factor );
 
             result[ std::get<2>(kfl) ] = interpValue;