Commit 89321fd4 authored by Stefan Behnel's avatar Stefan Behnel

Clarify types in atan2() call for usage in MSVC++.

parent 6508497f
...@@ -275,12 +275,11 @@ static {{type}} __Pyx_PyComplex_As_{{type_name}}(PyObject* o) { ...@@ -275,12 +275,11 @@ static {{type}} __Pyx_PyComplex_As_{{type_name}}(PyObject* o) {
theta = 0; theta = 0;
} else { } else {
r = -a.real; r = -a.real;
theta = atan2{{m}}(0, -1); theta = atan2{{m}}(0.0, -1.0);
} }
} else { } else {
r = __Pyx_c_abs{{func_suffix}}(a); r = __Pyx_c_abs{{func_suffix}}(a);
// MSVC++ seems to require the input casts. theta = atan2{{m}}(a.imag, a.real);
theta = atan2{{m}}(({{real_type}})a.imag, ({{real_type}})a.real);
} }
lnr = log{{m}}(r); lnr = log{{m}}(r);
z_r = exp{{m}}(lnr * b.real - theta * b.imag); z_r = exp{{m}}(lnr * b.real - theta * b.imag);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment