aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25
diff options
context:
space:
mode:
authorColin Snover2017-11-04 20:05:50 -0500
committerFilippos Karapetis2018-08-26 15:33:44 +0300
commit6af0c77b5a8fb9176870b287e0eb18c99c82c102 (patch)
tree9651d886f556be9a2d0805a4d40df20d8ea4f0d8 /engines/sword25
parent39ad93d738e46a3af8f7bd3c75bbb0ac6e058b11 (diff)
downloadscummvm-rg350-6af0c77b5a8fb9176870b287e0eb18c99c82c102.tar.gz
scummvm-rg350-6af0c77b5a8fb9176870b287e0eb18c99c82c102.tar.bz2
scummvm-rg350-6af0c77b5a8fb9176870b287e0eb18c99c82c102.zip
SWORD25: Remove use of C99 sqrtf
C++ sqrt is overloaded so operates using single-precision when receiving a float input. The C standard library on FreeMiNT does not fully support C99 math so use of sqrtf instead of sqrt(float) does not work.
Diffstat (limited to 'engines/sword25')
-rw-r--r--engines/sword25/math/vertex.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/engines/sword25/math/vertex.h b/engines/sword25/math/vertex.h
index 574ce39e60..537742b458 100644
--- a/engines/sword25/math/vertex.h
+++ b/engines/sword25/math/vertex.h
@@ -45,10 +45,6 @@
struct lua_State;
-#if defined(MACOSX) || defined(SOLARIS) || defined(__MINGW32__)
-#define sqrtf(x) ((float)sqrt(x))
-#endif
-
namespace Sword25 {
/**
@@ -67,7 +63,7 @@ public:
* @remark If only distances should be compared, sqrDist() should be used, since it is faster.
*/
inline int distance(const Vertex &vertex) const {
- return (int)(sqrtf(static_cast<float>(sqrDist(vertex))) + 0.5);
+ return (int)(sqrt(static_cast<float>(sqrDist(vertex))) + 0.5);
}
static Vertex &luaVertexToVertex(lua_State *L, int StackIndex, Vertex &vertex);