diff options
Diffstat (limited to 'source/blender/ikplugin')
-rw-r--r-- | source/blender/ikplugin/intern/itasc_plugin.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp index a5fdb9ef491..0bc73d4812b 100644 --- a/source/blender/ikplugin/intern/itasc_plugin.cpp +++ b/source/blender/ikplugin/intern/itasc_plugin.cpp @@ -22,6 +22,7 @@ * \ingroup ikplugin */ +#include <cmath> #include <stdlib.h> #include <string.h> #include <vector> @@ -1765,7 +1766,7 @@ static void execute_scene(struct Depsgraph *depsgraph, if (ikscene->cache && !reiterate && simulation) { iTaSC::CacheTS sts, cts; - sts = cts = (iTaSC::CacheTS)(timestamp * 1000.0 + 0.5); + sts = cts = (iTaSC::CacheTS)std::round(timestamp * 1000.0); if (ikscene->cache->getPreviousCacheItem(ikscene->armature, 0, &cts) == NULL || cts == 0) { // the cache is empty before this time, reiterate if (ikparam->flag & ITASC_INITIAL_REITERATION) { |