sin

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
the sin of <angleInRadians>
sin(<angleInRadians>)
Summary

Returns the sine of an angle (in radians).

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Parameters
NameTypeDescription
angleInRadians

A positive or negative number, or an expression that evaluates to a number.

Example
put the sin of (-pi/2) -- returns -1
put sin(the startAngle of graphic "Pointer")
Values
NameTypeDescription
return

The sin function returns a number between -1 and 1.

RelatedConstant: pi
Glossary: radian, custom function, return, degree
Control Structure: function
Description

Use the sin function to find the sine of an angle.

The sin function repeats every 2*pi radians:

sin(x) = sin(x + 2 * pi)

for any value of x.

The sin function requires its input to be in radians. To provide an angle in degrees, use the following custom function:

function sinInDegrees angleInDegrees
    return sin(angleInDegrees * pi / 180)
end sinInDegrees

Tagsmath