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
╭───┬─────────╮
│ 01.0000 │
│ 10.0000 │
│ 2-1.0000 │
│ 30.0000 │
│ 41.0000 │
╰───┴─────────╯