Function spinoso_math::cos

source ·
pub fn cos(value: f64) -> f64
Expand description

Computes the cosine of the given value (expressed in radians). Returns values in the range -1.0..=1.0.

Domain: (-INFINITY, INFINITY)

Codomain: [-1, 1]

§Examples

use spinoso_math as math;
assert_eq!(math::cos(PI), -1.0);