ES6: Math.hypot should only convert numbers once