
3 Jul
2011
3 Jul
'11
10:21 a.m.
Dear All, I have just discovered Boost.NumericConvert, useful and a nice effort! However, I am missing a RoundNearest function for float to int conversions, with only RoundEven being provided. RoundEven of course does exactly what it is described to do, rounding .5 to 0 and 1.5 to 2, but i'd like the highschool (usual?) behavior of rounding up when a number exactly in the middle is provided. I can implement it myself by slightly modifying RoundEven of course, but I am wondering if I am missing something obvious or whether there is a good reason why this function is not included? Thank you very much for any thoughts! Best, Dee