Skip to content
Vašek edited this page Jan 13, 2019 · 11 revisions

sin

Returns the sine of value in radians

Syntax:

sin(x)
Argument Description
double x The angle in radians to sine

Returns: double

Description:

In a right angled triangle sin(x) = Opposite / Hypotenuse. If you want to use degrees instead of radians use function dsin().

Example:

double x;
double value;
if (sin(x) > 0){
    value = 1;
}

This code will set value to 1, if the angle x is between 0 and pi radians.

Back to number_functions

Clone this wiki locally