瀏覽代碼

Keys interpolation fix

In line 3073 there was an unproper scope of cast to double.
AndrzejKozik 9 年之前
父節點
當前提交
a074ca58b3
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      code/FBXConverter.cpp

+ 1 - 1
code/FBXConverter.cpp

@@ -3070,7 +3070,7 @@ void Converter::InterpolateKeys( aiVectorKey* valOut, const KeyTimeList& keys, c
 
 
             // do the actual interpolation in double-precision arithmetics
             // do the actual interpolation in double-precision arithmetics
             // because it is a bit sensitive to rounding errors.
             // 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 );
             const ai_real interpValue = static_cast<ai_real>( valueA + ( valueB - valueA ) * factor );
 
 
             result[ std::get<2>(kfl) ] = interpValue;
             result[ std::get<2>(kfl) ] = interpValue;