round_nearest_neighbor_t#
Fully qualified name: carb::math::round_nearest_neighbor_t
Defined in carb/math/MulDiv.h
-
struct round_nearest_neighbor_t#
A rounding policy for
mulDiv
that rounds the result to the nearest neighbor.If the absolute value of the result is a positive half integer (0.5), the result is rounded away from zero. This works by adding
divisor / 2
to the temporary value before the divide operation. Use round_nearest_neighbor with the call to mulDiv().