Casting double to ulong weirdness

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Mon Aug 24 15:09:04 PDT 2015


On Mon, Aug 24, 2015 at 09:34:22PM +0000, via Digitalmars-d wrote:
[...]
> What is the correct way to truncate, not round, a floating-point value
> to an integer?

std.math.trunc.


T

-- 
Having a smoking section in a restaurant is like having a peeing section in a swimming pool. -- Edward Burr 


More information about the Digitalmars-d mailing list