Caution: See Chapter 11 for why you should always use std::hypot() over this na�ve definition (based on the Pythagorean Theorem)!
| 6 | // Caution: See Chapter 11 for why you should always use std::hypot() |
| 7 | // over this na�ve definition (based on the Pythagorean Theorem)! |
| 8 | double math::hypot(double x, double y) { return std::sqrt(square(x) + square(y)); } |