Skip to main content

math.sin(angle)

Returns the sine of an angle

Availability

Device + Agent

Parameters

Name Type Description
angle Float/integer An angle in radians

Returns

Float — the sine of the angle

Description

This function returns the sine of the passed angle. The sine is equal to the ratio of the side opposite the angle and the hypotenuse of the right-angled triangle they define.

The angle must be measured in radians. To convert an angle measured in degrees to its radian equivalent, multiply the angle by π, represented in Squirrel by the constant PI, and divide by 180.

Example Code