411 REFERENCE · Wikibooks
Perl Programming/Keywords/sin
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Perl shutdown sleep Keywords
The sin keyword
sin is the trigonometric function sine that assumes that X is in radians.
Syntax
sin(X)
Examples
The code *PI = \3.1415926535;
$a = 30; # in degrees
$sin = sin($a/180*$PI);
print "sin(" . $a . "°) = " . $sin . "\n"; prints the sine of the angle of 30 degrees: 0.499999999987039
Perl shutdown sleep Keywords