-
-
Notifications
You must be signed in to change notification settings - Fork 18
cos
Vašek edited this page Jan 13, 2019
·
6 revisions
Returns the cosine of value in radians
cos(x)
Argument | Description |
---|---|
double x |
The angle in radians to cosine |
Returns: double
In a right angled triangle cos(x)
= Adjacent / Hypotenuse.
If you want to use degrees instead of radians use function dcos()
.
double x;
double value;
if (cos(x) == 1){
value = 1;
}
This code will set value
to 1, if the angle x
is equal to 0 or pi radians.
Back to number_functions