Source Code:
(back to article)
<?php $angle = deg2rad(30); echo $angle . "\n"; $sine = sin($angle); echo $sine . "\n"; // Output: 0.5 $cosine = cos($angle); echo $cosine . "\n"; // Output: 0.866025 $tangent = tan($angle); echo $tangent . "\n"; // Output: 0.577350 ?>
Result:
Report an issue