sin
Returns the sine of an angle given in radians.
Keyboard Maestro: SIN
Details #
sin(angle) takes exactly one argument, an angle in radians, and returns a number between -1 and 1.
To use degrees, convert first: multiply by 3.14159265 and divide by 180.
Parameters #
Takes 1 argument.
{{ sin(text) }}
Examples #
sin(0)→
0round(sin(1.5707963), 4)→
1round(sin(deg * 3.14159265 / 180), 4)→
0.5| Sample variable | Value |
|---|---|
deg | 30 |
Gotchas #
Calling it with no argument or two arguments is an error:
sin() takes 1 argument, got 2.Anything that isn't a number is an error:
sin() needs a number, got text. Numeric text such as "0.5" is accepted.