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:
authorSybren A. Stüvel <sybren@blender.org>2020-09-04 17:23:00 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-09-04 17:23:08 +0300
commitfb5e2f56109e825ce3c446f80e075ee3dde81c3d (patch)
tree20b5808415568f503b4ed4b56d3d4f50b5fe8cee /source/blender/ikplugin
parentee49ce482a797a5937829de497abd69bcd1edb48 (diff)
Cleanup: Clang-Tidy bugprone-incorrect-roundings fixes
Should cause no noticeable difference.
Diffstat (limited to 'source/blender/ikplugin')
-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) {