Convert double to long if lossless

Per Nordlöw per.nordlow at gmail.com
Tue Jan 19 13:48:37 UTC 2021


On Tuesday, 19 January 2021 at 13:36:58 UTC, Steven Schveighoffer 
wrote:
> Use a cast instead.
>
> const lvalue = cast(long)value;

Ahh, good point.

Followd by a compare of the original value I presume.


More information about the Digitalmars-d-learn mailing list