Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Holes in Superquadric Tensor Glyphs #2363

Merged
merged 4 commits into from
Feb 7, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/Graphics/Glyphs/GlyphGeomUtility.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ class SCISHARE GlyphGeomUtility

inline double GlyphGeomUtility::spow(double e, double x)
{
const auto EPSILON = 1.0e-6;
tarkpate marked this conversation as resolved.
Show resolved Hide resolved
// This for round off of very small numbers.
if (std::abs(e) < EPSILON)
e = 0.0;

if (e < 0.0)
return -std::pow(-e, x);
else
Expand Down