Function ariprog::get_common_difference
source · pub fn get_common_difference(term: f32, previous_term: f32) -> f32Expand description
Returns the common difference between two terms of an arithmetic progression
§Arguments
term- Any term of the APprevious_term- The term beforeterm
§Examples
use ariprog;
let common_diff = ariprog::get_common_difference(10.0, 5.0); // Should return 5
let cd = ariprog::get_common_difference(12.0, 2.0); // should return 10