Skip to content

Commit 9867b12

Browse files
authored
Merge branch 'master' into tutorial-update
2 parents 10af866 + 58f20dd commit 9867b12

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Graphics/Glyphs/GlyphGeomUtility.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,11 @@ class SCISHARE GlyphGeomUtility
5656

5757
inline double GlyphGeomUtility::spow(double e, double x)
5858
{
59-
if (std::abs(e) < 1.0e-14)
60-
return 0.0;
59+
static const auto EPSILON = 1.0e-6;
60+
// This for round off of very small numbers.
61+
if (std::abs(e) < EPSILON)
62+
e = 0.0;
63+
6164
if (e < 0.0)
6265
return -std::pow(-e, x);
6366
else

0 commit comments

Comments
 (0)