From f8eeaae81f219170f7da4887c5bb0f73e8ea6d2e Mon Sep 17 00:00:00 2001 From: nicopietroni Date: Mon, 8 Jan 2007 09:23:49 +0000 Subject: [PATCH] added explicit cast in function inline float Sqrt(const int v) in order to avoid warnings --- vcg/math/base.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vcg/math/base.h b/vcg/math/base.h index a4730a89..954cd652 100644 --- a/vcg/math/base.h +++ b/vcg/math/base.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.20 2006/10/13 13:14:50 cignoni +Added two sqrt templates for resolving ambiguity of sqrt(int) + Revision 1.19 2005/12/01 01:03:37 cignoni Removed excess ';' from end of template functions, for gcc compiling @@ -111,7 +114,7 @@ namespace math { }; inline float Sqrt(const short v) { return sqrtf(v); } - inline float Sqrt(const int v) { return sqrtf(v); } + inline float Sqrt(const int v) { return sqrtf((float)v); } inline float Sqrt(const float v) { return sqrtf(v); } inline float Abs(const float v) { return fabsf(v); }