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

Function phase

crates/stdlib/src/cmath.rs:30–32  ·  view source on GitHub ↗
(z: ArgIntoComplex, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

28
29 #[pyfunction]
30 fn phase(z: ArgIntoComplex, vm: &VirtualMachine) -> PyResult<f64> {
31 pymath::cmath::phase(z.into_complex()).map_err(|err| pymath_exception(err, vm))
32 }
33
34 #[pyfunction]
35 fn polar(x: ArgIntoComplex, vm: &VirtualMachine) -> PyResult<(f64, f64)> {

Callers 1

test_phaseMethod · 0.90

Calls 2

pymath_exceptionFunction · 0.85
into_complexMethod · 0.80

Tested by 1

test_phaseMethod · 0.72