js_sys::Math

Function cos

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

The Math.cos() static function returns the cosine of the specified angle, which must be specified in radians. This value is length(adjacent)/length(hypotenuse).

MDN documentation