SIN(X);
X is the angular value in radian. We get output as Sin of the input angle.
<?Php
echo SIN(PI()); // Output is 1.2246467991474E-16 // same as 0
echo "<br>";
echo SIN(PI()/2); // Output 1
echo "<br>";
echo SIN(PI()/3); // Output is 0.86602540378444
echo "<br>";
echo SIN(PI()/4); // Output is 0.70710678118655
?>
<?Php
echo SIN(deg2rad(0)); // Output is 0
echo "<br>";
echo SIN(deg2rad(90)); // Output is 1
echo "<br>";
echo SIN(deg2rad(180)); // Output is 1.2246467991474E-16 // same as 0
?>
Plotting of SIN & SIN curves by using PHP GD function with deg2rad()