Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/ikplugin/intern/itasc_plugin.cpp')
-rw-r--r--source/blender/ikplugin/intern/itasc_plugin.cpp3
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) {