[DGD]Casting to int
Kris Van Hees
aedil at alchar.org
Fri Jun 30 03:57:51 CEST 2000
Someone on Viking noticed a rather interesting thing... casting a float to
an int actually does rounding, thus (int)0.51 yields 1 rather than 0. That
seems to be quite different from e.g. C & Java where casting to an integer
type truly returns the integer part of the number (truncating the floating
point value rather than rounding it up or down). Any particular reason why
DGD has taken this rather non-standard approach?
Kris
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list