Cos

From Xojo Documentation
Jump to: navigation, search
Method

Cos ( Double ) As Double

Returns the cosine of the given angle.


Syntax

result=Cos (value)

Part Type Description
result Double The cosine of value.
value Double The value (in radians) you want the cosine of.

Notes

The Cos function returns the cosine of the angle (in radians) passed to it. If the angle is in degrees, multiply it by PI/180 to convert it to radians.


Examples

This example uses the Cos function to return the cosine of an angle.

Dim d as Double
Const PI=3.14159
d=Cos(45*PI/180) //returns 0.707


See Also

Acos function.

Personal tools
Namespaces

Variants
Actions
Main
Content
Starting Out
Dig Deeper
More Help
Toolbox
About