From 81f78d4ddf2bee6164dd9cb90657d0666688603d Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Sat, 4 Nov 2017 20:10:54 -0500 Subject: BLADERUNNER: Remove use of C99 math C++ math functions are overloaded so operate using single-precision when receiving a float input. The C standard library on FreeMiNT does not fully support C99 math so use of sqrtf, sinf, etc. instead of the C++ API does not work. --- engines/bladerunner/vector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/bladerunner/vector.h') diff --git a/engines/bladerunner/vector.h b/engines/bladerunner/vector.h index 706d81f9c1..f6670c23f0 100644 --- a/engines/bladerunner/vector.h +++ b/engines/bladerunner/vector.h @@ -55,7 +55,7 @@ public: Vector3(float ax, float ay, float az) : x(ax), y(ay), z(az) {} - float length() { return sqrtf(x * x + y * y + z * z); } + float length() { return sqrt(x * x + y * y + z * z); } Vector3 normalize() { float len = length(); if (len == 0) { -- cgit v1.2.3