Cos()

From TinyMUX
Revision as of 19:38, 25 November 2010 by Ihavenomouth (talk | contribs) (New page: Category:Functions {{Function|cos(<number>[, <units>])}} Returns the cosine of <number> where <number> is expressed in <units>. <units> may be 'radians', 'degrees', or 'gradians' or...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


cos(<number>[, <units>])

Returns the cosine of <number> where <number> is expressed in <units>.

<units> may be 'radians', 'degrees', or 'gradians' or just the first letter of any of these. By default, <units> is radians.

In a circle, there are 2*pi() radians, 360 degrees, and 400 gradians.

Example

> say cos(0)

You say, "1"

> say cos(fdiv(pi(),2))

You say, "0"

> say cos(fdiv(pi(),4))

You say, "0.707107"

> say cos(fdiv(pi(),6))

You say, "0.866025"

Related Topics

acos(), asin(), atan(), pi(), sin(), tan()