PHP sin()
PHP sin(x) function returns the sine value of radian angle x.
The principle values for x is [-∞,∞].
<?PHP
echo sin(M_PI); //1.2246467991474E-16
echo sin(M_PI/2); //1
?>
deg2rad() function can be used to convert degree to radian angle.
<?PHP
echo sin(deg2rad(60)); //0.86602540378444
echo sin(deg2rad(30)); //0.5
?>
Sine y=sin(x) Graph
|
|
X( degree ̊ )
X(Rad)
Y = Sine(X)