From 8d5b2cae719f36b1c9229246c6fc57fb53f98d94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 31 Mar 2013 23:50:20 +0200 Subject: [PATCH] Math: std::hypot() is not available in NaCl newlib. Probably bug / not-yet-implemented feature. --- src/Math/Complex.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Math/Complex.h b/src/Math/Complex.h index 2a2cb2349..2fd77e6ae 100644 --- a/src/Math/Complex.h +++ b/src/Math/Complex.h @@ -339,7 +339,12 @@ template class Complex { * @see isNormalized() */ inline T length() const { + /** @todo Remove when NaCl's newlib has this fixed */ + #ifndef CORRADE_TARGET_NACL_NEWLIB return std::hypot(_real, _imaginary); + #else + return std::sqrt(dot()); + #endif } /**