| 212 | |
| 213 | |
| 214 | template<typename _Tp> static inline _Tp hypot(_Tp a, _Tp b) |
| 215 | { |
| 216 | a = std::abs(a); |
| 217 | b = std::abs(b); |
| 218 | if( a > b ) |
| 219 | { |
| 220 | b /= a; |
| 221 | return a*std::sqrt(1 + b*b); |
| 222 | } |
| 223 | if( b > 0 ) |
| 224 | { |
| 225 | a /= b; |
| 226 | return b*std::sqrt(1 + a*a); |
| 227 | } |
| 228 | return 0; |
| 229 | } |
| 230 | |
| 231 | |
| 232 | template<typename _Tp> bool |
no test coverage detected