SHIP:Sail:cos

From Serious Documentation
Revision as of 16:32, 27 September 2016 by CarltonHeyer (talk | contribs) (Created page with "__NOTOC__ {{SailFuncTableStart|}}<onlyinclude> |{{SailFunc|cos}}||{{DataType|Float}}||style="text-align:center;"|v5.0.204||Gets the cos of a radians angle{{v5}}</onlyinclude>...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function Returns Introduced Description
cos Float v5.0.204 Gets the cos of a radians angleBadge SHIPv5.gif

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