aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2007-12-19 14:02:03 +0000
committerMax Horn2007-12-19 14:02:03 +0000
commit272f02e001e4138e3a8c20c8eaa514462b849818 (patch)
tree35c9a25496aaad0dbb45ea08f3dd9613662b171c
parent8695b4583fb196380bc637964fed80311b70f88a (diff)
downloadscummvm-rg350-272f02e001e4138e3a8c20c8eaa514462b849818.tar.gz
scummvm-rg350-272f02e001e4138e3a8c20c8eaa514462b849818.tar.bz2
scummvm-rg350-272f02e001e4138e3a8c20c8eaa514462b849818.zip
Replaced sqrtf by sqrt (the former causes more problems than the tiny potential improvement is worth it)
svn-id: r29905
-rw-r--r--graphics/primitives.cpp9
1 files changed, 1 insertions, 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;