diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2019-01-13 22:44:17 +0100 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2019-01-13 22:44:17 +0100 |
commit | 89321fd45506ee2ae13388f40b60334464033860 (patch) | |
tree | 8d52f76ec085b400143ca044afc8be579edba242 | |
parent | 6508497f84204d4043c48980664ac464d8126be4 (diff) | |
download | cython-msvc_cpp.tar.gz |
Clarify types in atan2() call for usage in MSVC++.msvc_cpp
-rw-r--r-- | Cython/Utility/Complex.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Cython/Utility/Complex.c b/Cython/Utility/Complex.c index a59c528f0..2e2277231 100644 --- a/Cython/Utility/Complex.c +++ b/Cython/Utility/Complex.c @@ -275,12 +275,11 @@ static {{type}} __Pyx_PyComplex_As_{{type_name}}(PyObject* o) { theta = 0; } else { r = -a.real; - theta = atan2{{m}}(0, -1); + theta = atan2{{m}}(0.0, -1.0); } } else { r = __Pyx_c_abs{{func_suffix}}(a); - // MSVC++ seems to require the input casts. - theta = atan2{{m}}(({{real_type}})a.imag, ({{real_type}})a.real); + theta = atan2{{m}}(a.imag, a.real); } lnr = log{{m}}(r); z_r = exp{{m}}(lnr * b.real - theta * b.imag); |