Lines Matching full:average
4 /// Provides methods to compute the average of two integers, without overflows.
5 pub trait Average: Integer { interface
6 /// Returns the ceiling value of the average of `self` and `other`.
12 /// use num_integer::Average;
25 /// Returns the floor value of the average of `self` and `other`.
31 /// use num_integer::Average;
45 impl<I> Average for I
52 // see http://aggregate.org/MAGIC/#Average%20of%20Integers
54 /// Returns the floor value of the average of `self` and `other`.
60 /// Returns the ceil value of the average of `self` and `other`.
67 /// Returns the floor value of the average of `x` and `y` --
68 /// see [Average::average_floor](trait.Average.html#tymethod.average_floor).
70 pub fn average_floor<T: Average>(x: T, y: T) -> T { in average_floor()
73 /// Returns the ceiling value of the average of `x` and `y` --
74 /// see [Average::average_ceil](trait.Average.html#tymethod.average_ceil).
76 pub fn average_ceil<T: Average>(x: T, y: T) -> T { in average_ceil()