From 89321fd45506ee2ae13388f40b60334464033860 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 13 Jan 2019 22:44:17 +0100 Subject: Clarify types in atan2() call for usage in MSVC++. --- Cython/Utility/Complex.c | 5 ++--- 1 file 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); -- cgit v1.2.1