
17 Apr
2008
17 Apr
'08
3:34 p.m.
Hi all, I just discovered (by debugging instead of reading :-() that a numeric_cast from a floating to an integral type always truncates by default, that is, 26.99999 is casted to 26. Is there a way to tell numeric_cast to use the nearest integer? Of course I can add 0.5 to my value and cast afterwards but that's definitely ugly. Thanks in advance. Best regards, Rainer