Skip to content

Commit

Permalink
Use CoordType, not float
Browse files Browse the repository at this point in the history
  • Loading branch information
alriddoch committed Mar 14, 2012
1 parent dd3f722 commit 6d52ede
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion wfmath/line.h
Expand Up @@ -60,7 +60,7 @@ class Line
Line& operator=(const Line& a);

/// generic: check if two classes are equal, up to a given tolerance
bool isEqualTo(const Line& s, float epsilon = numeric_constants<CoordType>::epsilon()) const;
bool isEqualTo(const Line& s, CoordType epsilon = numeric_constants<CoordType>::epsilon()) const;
/// generic: check if two classes are equal, up to tolerance WFMATH_EPSILON
bool operator==(const Line& s) const {return isEqualTo(s);}
/// generic: check if two classes are not equal, up to tolerance WFMATH_EPSILON
Expand Down
2 changes: 1 addition & 1 deletion wfmath/line_funcs.h
Expand Up @@ -31,7 +31,7 @@
namespace WFMath {

template<int dim>
inline bool Line<dim>::isEqualTo(const Line<dim> & l, float epsilon) const
inline bool Line<dim>::isEqualTo(const Line<dim> & l, CoordType epsilon) const
{
size_type size = m_points.size();
if (size != l.m_points.size()) {
Expand Down
2 changes: 1 addition & 1 deletion wfmath/stream.h
Expand Up @@ -367,7 +367,7 @@ std::istream& operator>>(std::istream& is, Polygon<dim>& r)
float str_eps = 1;
while(--str_prec > 0) // Precision of 6 gives epsilon = 1e-5
str_eps /= 10;
float epsilon = FloatMax(str_eps, numeric_constants<CoordType>::epsilon());
CoordType epsilon = FloatMax(str_eps, numeric_constants<CoordType>::epsilon());

r.m_orient = _Poly2Orient<dim>();

Expand Down

0 comments on commit 6d52ede

Please sign in to comment.