sample_sum

Function sample_sum 

Source
pub fn sample_sum<T>(array: &[T], start: usize, end: usize) -> T
where T: Copy + Sum<T>,
Expand description

Get the sum of a range of numbers

§Parameters

  • array: An array of numbers
  • start: Start index
  • end: End index

§Returns

The sum