D
Daniel Billingsley
I'm trying to figure out what happens when I cast a double with (int)...
does it round or drop the decimal part?
MS says:
"When you convert from a double or float value to an integral type, the
value is rounded towards zero to the nearest integral value."
Uh... what? I've hard of "rounding to the nearest integral value",
"rounding up", "rounding down", but what in tarnation is "rounded towards
zero"? WHAT zero?
does it round or drop the decimal part?
MS says:
"When you convert from a double or float value to an integral type, the
value is rounded towards zero to the nearest integral value."
Uh... what? I've hard of "rounding to the nearest integral value",
"rounding up", "rounding down", but what in tarnation is "rounded towards
zero"? WHAT zero?