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

Function polar

crates/stdlib/src/cmath.rs:35–37  ·  view source on GitHub ↗
(x: ArgIntoComplex, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

33
34 #[pyfunction]
35 fn polar(x: ArgIntoComplex, vm: &VirtualMachine) -> PyResult<(f64, f64)> {
36 pymath::cmath::polar(x.into_complex()).map_err(|err| pymath_exception(err, vm))
37 }
38
39 #[pyfunction]
40 fn rect(r: ArgIntoFloat, phi: ArgIntoFloat, vm: &VirtualMachine) -> PyResult<Complex64> {

Callers 2

polar_complexMethod · 0.90
polar_with_errno_setMethod · 0.90

Calls 2

pymath_exceptionFunction · 0.85
into_complexMethod · 0.80

Tested by 2

polar_complexMethod · 0.72
polar_with_errno_setMethod · 0.72