Best way to "convert" a real to ireal
Christian Kamm
kamm.incasoftware at shift-at-left-and-remove-this.de
Thu Sep 13 04:57:05 PDT 2007
> creal have .re and .im properties, but .im returns a real, not an ireal
> as I would expect. Is there another property that will return the
> imaginary part as an ireal? I can't seem to find the creal properties
> documented anywhere.
I don't think there is. The properties are mentioned here
http://www.digitalmars.com/d/property.html
among the properties of floating point types, but not really documented.
I expect .im behaves the way it does since that's how it's used in
mathematics. So c.im * 1.0i is the right way to make it an ireal.
Christian
More information about the Digitalmars-d-learn
mailing list