From ebc0ac52c093d62d708ea25168a16fa1c1559c20 Mon Sep 17 00:00:00 2001 From: cignoni Date: Fri, 13 Oct 2006 13:14:50 +0000 Subject: [PATCH] Added two sqrt templates for resolving ambiguity of sqrt(int) --- vcg/math/base.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vcg/math/base.h b/vcg/math/base.h index 8d353db2..a4730a89 100644 --- a/vcg/math/base.h +++ b/vcg/math/base.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.19 2005/12/01 01:03:37 cignoni +Removed excess ';' from end of template functions, for gcc compiling + Revision 1.18 2004/08/31 15:42:59 fasano Aggiunte macro sin/cos/atan per C++ Builder @@ -107,7 +110,9 @@ namespace math { inline bool operator() ( const SCALAR a, const SCALAR b ) { return fabs(a)>fabs(b); } }; - + inline float Sqrt(const short v) { return sqrtf(v); } + inline float Sqrt(const int v) { return sqrtf(v); } + inline float Sqrt(const float v) { return sqrtf(v); } inline float Abs(const float v) { return fabsf(v); } inline float Cos(const float v) { return cosf(v); }