From 272f02e001e4138e3a8c20c8eaa514462b849818 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 19 Dec 2007 14:02:03 +0000 Subject: Replaced sqrtf by sqrt (the former causes more problems than the tiny potential improvement is worth it) svn-id: r29905 --- graphics/primitives.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/graphics/primitives.cpp b/graphics/primitives.cpp index 354cc8e6ae..919ff05c15 100644 --- a/graphics/primitives.cpp +++ b/graphics/primitives.cpp @@ -26,13 +26,6 @@ namespace Graphics { -#if defined (MACOSX) || defined (__SYMBIAN32__) -// Older versions of Mac OS X didn't supply a sqrtf function. To ensure -// binary compatibility, we force using sqrt instead of sqrtf (the only -// potential drawback is that it might be a little bit slower). -#define sqrtf sqrt -#endif - void drawLine(int x0, int y0, int x1, int y1, int color, void (*plotProc)(int, int, int, void *), void *data) { // Bresenham's line algorithm, as described by Wikipedia const bool steep = ABS(y1 - y0) > ABS(x1 - x0); @@ -89,7 +82,7 @@ void drawThickLine(int x0, int y0, int x1, int y1, int thickness, int color, voi float dx = x1 - x0; float dy = y1 - y0; - float d = sqrtf(dx * dx + dy * dy); + float d = (float)sqrt(dx * dx + dy * dy); if (!d) return; -- cgit v1.2.3