Are you asking about rounding a floating point value? There are several rounding strategies:

- Round towards zero (truncation). For example, 35.8 rounds to 35, -40.7 rounds to -40.
- Round to nearest. For example, 35.3 rounds to 35, 35.6 rounds to 36. Not clear what 35.5 rounds to.
- Round towards infinity. For example, 35.2 rounds to 36, -40.9 rounds to -40.
- Round towards negative infinity. For example, 35.8 rounds to 35, -40.1 rounds to -41.
- Round to larger magnitude. For example, 35.2 rounds to 36, -40.2 rounds to -41.
- Some other strategy I haven't listed.

Which of these best suits your needs?

Notice that the C Standard assures you that "round towards zero" (truncation) is used automatically if you cast a floating point value into an integral variable.