Browse Source

Math: std::hypot() is not available in NaCl newlib.

Probably bug / not-yet-implemented feature.
pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
8d5b2cae71
  1. 5
      src/Math/Complex.h

5
src/Math/Complex.h

@ -339,7 +339,12 @@ template<class T> 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
}
/**

Loading…
Cancel
Save