Comparison of Imaginary types

Nick Treleaven nick at geany.org
Fri Jul 10 10:40:33 UTC 2026


On Wednesday, 8 July 2026 at 22:59:44 UTC, Damian McGuckin wrote:
> Given a
>
>     cdouble c;
>
> how does one extract the real and imaginary parts in D?

You use `c.re` and `c.im` respectively. Those are in the spec but 
not very clear:
https://dlang.org/spec/property.html#numeric


More information about the Digitalmars-d-learn mailing list