Function ariprog::get_first_term
source · pub fn get_first_term(
nth_term: f32,
common_difference: f32,
nth_term_position: f32
) -> f32Expand description
Returns the first term of an arithmetic progression
§Arguments
nth_term- The nth term of the APcommon_difference- The common difference of the APnth_term_position- The nth term position (nth) of the AP (e.g.: the twentieth term is in position 20)
§Examples
use ariprog;
let first_term = ariprog::get_first_term(-103.0, -2.0, 50.0); // Should return -5