W3cubDocs

/Nushell

math sin for math

Returns the sine of the number.

Signature

> math sin {flags}

Flags

  • --degrees, -d: Use degrees instead of radians

Input/output types:

input output
list<number> list<number>
number number

Examples

Apply the sine to π/2

>3.141592/2|math sin|math round--precision4
1

Apply the sine to a list of angles in degrees

> [090180270360] |math sin-d|math round--precision4
╭───┬───────╮
00.00
11.00
20.00
3-1.00
40.00
╰───┴───────╯

Tips: Command math sin was not included in the official binaries by default, you have to build it with --features=extra flag

Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/math_sin.html