Roots of unity: Difference between revisions

m
→‎{{header|Raku}}: Fix comments: Perl 6 --> Raku
(Rename Perl 6 -> Raku, alphabetize, minor clean-up)
m (→‎{{header|Raku}}: Fix comments: Perl 6 --> Raku)
Line 1,484:
=={{header|Raku}}==
(formerly Perl 6)
Perl 6Raku has a built-in function <tt>cis</tt> which returns a unitary complex number given its phase. Perl 6Raku also defines the <tt>tau = 2*pi</tt> constant. Thus the k-th n-root of unity can simply be written <tt>cis(k*τ/n)</tt>.
 
<lang perl6>constant n = 10;
2,392

edits