浏览代码

Update FBXConverter.cpp

AndrzejKozik 8 年之前
父节点
当前提交
dcb7478785
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      code/FBXConverter.cpp

+ 1 - 3
code/FBXConverter.cpp

@@ -3068,9 +3068,7 @@ void Converter::InterpolateKeys( aiVectorKey* valOut, const KeyTimeList& keys, c
             const KeyTimeList::value_type timeA = std::get<0>(kfl)->at( id0 );
             const KeyTimeList::value_type timeA = std::get<0>(kfl)->at( id0 );
             const KeyTimeList::value_type timeB = std::get<0>(kfl)->at( id1 );
             const KeyTimeList::value_type timeB = std::get<0>(kfl)->at( id1 );
 
 
-            // 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 ai_real factor = timeB == timeA ? 0. : static_cast<ai_real>( ( 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;