www.digitalmars.com         C & C++   DMDScript  

D - casting complex types

reply davepermen <davepermen_member pathlink.com> writes:
float imag(ifloat x) {
return cast(float)x;
}

doesn't work. partially understandable, but how do i get the ifloat value out of
the ifloat, and use it as a real float then?
Nov 26 2003
parent davepermen <davepermen_member pathlink.com> writes:
float image(ifloat x) {
return x.im;
} looks like that works, too

In article <bq281a$2s94$1 digitaldaemon.com>, davepermen says...
float imag(ifloat x) {
return cast(float)x;
}

doesn't work. partially understandable, but how do i get the ifloat value out of
the ifloat, and use it as a real float then?
Nov 26 2003