diff --git a/wfmath/line.h b/wfmath/line.h index b965871..84724e1 100644 --- a/wfmath/line.h +++ b/wfmath/line.h @@ -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::epsilon()) const; + bool isEqualTo(const Line& s, CoordType epsilon = numeric_constants::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 diff --git a/wfmath/line_funcs.h b/wfmath/line_funcs.h index 381b39c..8e2cf27 100644 --- a/wfmath/line_funcs.h +++ b/wfmath/line_funcs.h @@ -31,7 +31,7 @@ namespace WFMath { template -inline bool Line::isEqualTo(const Line & l, float epsilon) const +inline bool Line::isEqualTo(const Line & l, CoordType epsilon) const { size_type size = m_points.size(); if (size != l.m_points.size()) { diff --git a/wfmath/stream.h b/wfmath/stream.h index 8327441..a4bcd6c 100644 --- a/wfmath/stream.h +++ b/wfmath/stream.h @@ -367,7 +367,7 @@ std::istream& operator>>(std::istream& is, Polygon& 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::epsilon()); + CoordType epsilon = FloatMax(str_eps, numeric_constants::epsilon()); r.m_orient = _Poly2Orient();