Syntax:cos
From GameStudio Wiki
(Redirected from Cos)
Function: cos, cosv
|
Cosine function.
Contents |
[edit]
Definition
cos(FLOAT x); cosv(VAR x);
[edit]
Parameters
[edit]
Returns
- Cosine angle of x.
[edit]
Remarks
- cos() is an overloaded function under lite-C. When called with a var argument, it behaves like cosv(); when called with a float or double argument it behaves like the standard C/C++ cos() function.
[edit]
Example
x = cosv(90); // x is 0 x = cosv(45); // x is 0.707 x = acos((var)0.707); // x is 45
[edit]
