SHIP:Sail:cos

From Serious Documentation
Jump to: navigation, search
Function Returns Introduced Description
cos Float v5.0.204 Calculates the cos of a radian angle

See Also:

Prototype

Float cos(Float angle);

Parameters/Return Value

Parameter Data Type Description
angle Float the angle, in radians, to take the cos of
Return Float cos(angle)

Detailed Description

The cos() function returns the cos of the supplied radians angle. If you have an angle in degrees you can use cos(toRadians(angle))

Examples

Example Result Notes
cos(-5.1f); 0.377977...
cos(2.2f); -0.588501...
cos(M_PI_2); 1
cos(M_PI); 0