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/freestyle/intern')
-rw-r--r--source/blender/freestyle/intern/stroke/StrokeRep.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/freestyle/intern/stroke/StrokeRep.cpp b/source/blender/freestyle/intern/stroke/StrokeRep.cpp
index 661c144476c..fe12727b0c0 100644
--- a/source/blender/freestyle/intern/stroke/StrokeRep.cpp
+++ b/source/blender/freestyle/intern/stroke/StrokeRep.cpp
@@ -19,6 +19,8 @@
* \brief Class to define the representation of a stroke (for display purpose)
*/
+#include <cmath>
+
#include "StrokeRep.h"
#include "Stroke.h"
#include "StrokeAdvancedIterators.h"
@@ -573,7 +575,7 @@ void Strip::computeTexCoordWithTips(const vector<StrokeVertex *> &iStrokeVertice
v = iStrokeVertices.begin();
vend = iStrokeVertices.end();
l = (*v)->strokeLength() / spacedThickness;
- tiles = int(l + 0.5); // round to the nearest
+ tiles = std::roundf(l); // round to the nearest
fact = (float(tiles) + 0.5) / l;
#if 0