C/C++ rounding cheat sheet

Rounding-mode independent methods

Floor

Ceil

Truncate / Round toward zero

Round to nearest, halfway cases away from zero

Round to nearest, halfway cases to even

Less commonly available:

Round to nearest, halfway cases upwards

Rounding-mode dependent methods

Other languages

Javascript

PHP