math cos
for math
Returns the cosine of the number.
Signature
> math cos --degrees
Parameters
--degrees
(-d)
: Use degrees instead of radians
Examples
Apply the cosine to π
> math pi | math cos
-1
Apply the cosine to a list of angles in degrees
> [0 90 180 270 360] | math cos -d
╭───┬─────────╮
│ 0 │ 1.0000 │
│ 1 │ 0.0000 │
│ 2 │ -1.0000 │
│ 3 │ 0.0000 │
│ 4 │ 1.0000 │
╰───┴─────────╯