Don Clugston <[email protected]> wrote:
(1) Add two necessary functions to std.math:
// Rounds x to the nearest int or long using the currently selected
rounding mode
// (MUCH faster than cast(int)).
Why isn't this the default, i.e. why doesn't cast(int) do this?
Because C stuffed up in a major way, and we have to live with it.
Intel has tried THREE TIMES to fix C's mistake, by making hardware
changes and adding new instructions to their CPUs.
Sure, I can see the value in 'it's what C does'. Now, seeing as
(int)1.0f does not compile in D, is there really a problem defining
cast(int)1.0f to use this new, magical function? I'm not trying to
be obnoxious, I just am.
--
Simen
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos