From 3bfa8a27a87edb9c761d50f293f3744630775f3c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 2 Oct 2006 13:11:32 +0000 Subject: [PATCH] From Edgar Ellis, "Changed return type of osg::equivalent methods from float/double to bool. " --- include/osg/Math | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/osg/Math b/include/osg/Math index e459e1b1c..72aa4c233 100644 --- a/include/osg/Math +++ b/include/osg/Math @@ -126,14 +126,14 @@ inline T absolute(T v) { return v<(T)0?-v:v; } * meaning that the difference between them is less than an epsilon value * which defaults to 1e-6. */ -inline float equivalent(float lhs,float rhs,float epsilon=1e-6) +inline bool equivalent(float lhs,float rhs,float epsilon=1e-6) { float delta = rhs-lhs; return delta<0.0f?delta>=-epsilon:delta<=epsilon; } /** return true if double lhs and rhs are equivalent, * meaning that the difference between them is less than an epsilon value * which defaults to 1e-6. */ -inline double equivalent(double lhs,double rhs,double epsilon=1e-6) +inline bool equivalent(double lhs,double rhs,double epsilon=1e-6) { double delta = rhs-lhs; return delta<0.0?delta>=-epsilon:delta<=epsilon; } /** return the minimum of two values, equivilent to std::min.