Difference between revisions of "SHIP:Sail:cos"

From Serious Documentation
Jump to: navigation, search
 
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
{{SailFuncTableStart|}}<onlyinclude>
 
{{SailFuncTableStart|}}<onlyinclude>
|{{SailFunc|cos}}||{{DataType|Float}}||style="text-align:center;"|v5.0.204||Gets the cos of a radians angle{{v5}}</onlyinclude>
+
|{{SailFunc|cos}}||{{DataType|Float}}||style="text-align:center;"|v5.0.204||Calculates the cos of a radian angle</onlyinclude>
 
|}
 
|}
 
== See Also: ==
 
== See Also: ==

Latest revision as of 11:33, 14 October 2016

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