MCPcopy Index your code
hub / github.com/RustPython/RustPython / hypot

Function hypot

crates/stdlib/src/math.rs:232–235  ·  view source on GitHub ↗
(coordinates: PosArgs<ArgIntoFloat>)

Source from the content-addressed store, hash-verified

230
231 #[pyfunction]
232 fn hypot(coordinates: PosArgs<ArgIntoFloat>) -> f64 {
233 let coords = ArgIntoFloat::vec_into_f64(coordinates.into_vec());
234 pymath::math::hypot(&coords)
235 }
236
237 #[pyfunction]
238 fn dist(p: Vec<ArgIntoFloat>, q: Vec<ArgIntoFloat>, vm: &VirtualMachine) -> PyResult<f64> {

Callers 4

__add__Method · 0.90
__sub__Method · 0.90
testHypotMethod · 0.85
testHypotAccuracyMethod · 0.85

Calls 1

into_vecMethod · 0.45

Tested by 2

testHypotMethod · 0.68
testHypotAccuracyMethod · 0.68