routine sin

Documentation for routine sin assembled from the following types:

class Cool

From Cool

(Cool) routine sin

Defined as:

sub sin(Numeric(Cool))
method sin()

Coerces the invocant (or in the sub form, the argument) to Numeric, interprets it as radians, returns its sine.

say sin(0);             # OUTPUT: «0␤» 
say sin(pi/4);          # OUTPUT: «0.707106781186547␤» 
say sin(pi/2);          # OUTPUT: «1␤»

Note that Perl 6 is no computer algebra system, so sin(pi) typically does not produce an exact 0, but rather a very small floating-point number.