Returns the cosine of an angle
Device + Agent
Name | Type | Description |
---|---|---|
angle | Float/integer |
An angle in radians
|
Float — the cosine of the angle
This function returns the cosine of the passed angle. The cosine is equal to the ratio of the side adjacent to the angle and the hypotenuse of the right-angled triangle they define.
The angle must be measured in radians. To convert an angle measured in degrees to its radian equivalent, multiply the angle by π, represented in Squirrel by the constant PI
, and divide by 180.