Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

average

Returns the average of two unsigned integers. The result is rounded down.

Fully qualified path: openzeppelin_utils::math::average

pub fn average<
    T, +Unsigned<T>, +Add<T>, +Div<T>, +BitAnd<T>, +BitXor<T>, +Into<u8, T>, +Copy<T>, +Drop<T>,
>(
    a: T, b: T,
) -> T