[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Off Topic : c++ function for rounding

round(x) = floor( x + 0.5f);

William Jensen wrote:
> I know this isn't the right list, but how would I even find the 'right list'
> for a c++ question?  I know about ceil and floor but those aren't what I'm
> after.  I'm looking for a function that will take 1.4 and make it 1, but 1.5
> or higher is 2.  Know what I mean?  Any built-in c++ function to do that?

Reply to: