Sha256: e95a911cc95c3f4864066dd88a7f4360865b1f47c2bb388531708f2fa573bccd
Contents?: true
Size: 384 Bytes
Versions: 102
Compression:
Stored size: 384 Bytes
Contents
// Returns the cosine of a number. // @param {Number} $x A number in rad or deg. Assuming unitless number to be in rad. // @example // cos(0.7854) // 0.70711 // cos(45deg) // 0.70711 @function cos ($x) { $x: unitless-rad($x) % ($PI * 2); $ret: 0; @for $n from 0 to 24 { $ret: $ret + pow(-1, $n) * pow($x, 2 * $n) / fact(2 * $n); } @return $ret; }
Version data entries
102 entries across 102 versions & 2 rubygems