(z: ArgIntoComplex, vm: &VirtualMachine)
| 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)> { |