Int to float?

anonymous via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Mar 5 12:16:54 PST 2015


On Thursday, 5 March 2015 at 20:03:09 UTC, Benjamin Thaut wrote:
> int someValue = 5;
> float sameBinary = *(cast(float*)cast(void*)&someValue);

The cast(void*) isn't necessary.


More information about the Digitalmars-d-learn mailing list