Problem with using std.math: abs and std.complex: abs at the same time

berni someone at something.org
Wed Sep 18 13:24:05 UTC 2019


On Wednesday, 18 September 2019 at 12:37:28 UTC, Simen Kjærås 
wrote:
> How to resolve this, though? The simplest solution is to not 
> use selective imports:
>
>     import std.math;
>     import std.complex;
>
>     writeln(abs(complex(1.0,1.0)));
>     writeln(abs(1.0));

That works. But: I'm trying to write some code for math.d and 
when I put this code inside math.d it doesn't work anymore. Also 
removing "import std.math" or moving it after the other import, 
did not help.



More information about the Digitalmars-d-learn mailing list