round_away_from_zero_t#

Fully qualified name: carb::math::round_away_from_zero_t

Defined in carb/math/MulDiv.h

struct round_away_from_zero_t#

A rounding policy for mulDiv that rounds the result away from zero.

When passed to mulDiv(), this policy will always round the result away from zero. Positive numbers round toward the ceiling; negative numbers round further negative. This works by adding divisor - 1 to the temporary value before the divide operation. Use round_away_from_zero or round_ceil with the call to mulDiv().