From 458e1467658d4cbb411590e1969e34391a82a519 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 20 Apr 2013 00:58:32 +0200 Subject: [PATCH] Math: std::fma() is not available in NaCl's newlib. --- src/Math/Functions.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Math/Functions.h b/src/Math/Functions.h index c1b330ca7..cf49d82cd 100644 --- a/src/Math/Functions.h +++ b/src/Math/Functions.h @@ -289,7 +289,12 @@ Computes and returns @f$ ab + c @f$. template inline T fma(const T& a, const T& b, const T& c); #else template inline typename std::enable_if::value, T>::type fma(T a, T b, T c) { + /** @todo Remove when NaCl's newlib has this fixed */ + #ifndef CORRADE_TARGET_NACL_NEWLIB return std::fma(a, b, c); + #else + return a*b + c; + #endif } template inline Vector fma(const Vector& a, const Vector& b, const Vector& c) { return a*b + c;