Trait Average
pub trait Average: Integer
Provides methods to compute the average of two integers, without overflows.
Required Methods
fn average_ceil(&self, other: &Self) -> SelfReturns the ceiling value of the average of
selfandother. --⌈(self + other)/2⌉Examples
use Average; assert_eq!; assert_eq!; assert_eq!; assert_eq!; assert_eq!; assert_eq!;fn average_floor(&self, other: &Self) -> SelfReturns the floor value of the average of
selfandother. --⌊(self + other)/2⌋Examples
use Average; assert_eq!; assert_eq!; assert_eq!; assert_eq!; assert_eq!; assert_eq!;