Skip to content

Commit

Permalink
switch to powInt (drop an if)
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-tierny committed Dec 15, 2023
1 parent e31f766 commit 3742292
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/base/topoMap/TopoMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@

// cos and sin computations, so we are cautious on testing equalities between
// double.
static double Epsilon{ttk::Geometry::pow(10.0, -FLT_DIG + 2)};
static double EpsilonDBL{ttk::Geometry::pow(10.0, -DBL_DIG + 2)};
static double Epsilon{ttk::Geometry::powInt(10.0, -FLT_DIG + 2)};
static double EpsilonDBL{ttk::Geometry::powInt(10.0, -DBL_DIG + 2)};

// Normalizes a given vector.
template <typename T>
Expand Down Expand Up @@ -210,9 +210,9 @@ namespace ttk {
// the smallest significative value because we use sqrt/cos/sin so we take
// precautionary measures.
if(std::is_same<T, double>::value) {
Epsilon = ttk::Geometry::pow(10.0, -DBL_DIG + 2);
Epsilon = ttk::Geometry::powInt(10.0, -DBL_DIG + 2);
} else if(std::is_same<T, float>::value) {
Epsilon = ttk::Geometry::pow(10.0, -FLT_DIG + 2);
Epsilon = ttk::Geometry::powInt(10.0, -FLT_DIG + 2);
} else {
printErr("Error, template type must be either double or float.\n");
return 1;
Expand Down

0 comments on commit 3742292

Please sign in to comment.