Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add Complex.polar.
  • Loading branch information
colomon committed Oct 26, 2011
1 parent 9b9d1c0 commit 519e0b6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/CORE.setting
Expand Up @@ -479,6 +479,7 @@ my class Complex is Numeric {
method re() { Q:CgOp { (complex_re {self}) } }
method im() { Q:CgOp { (complex_im {self}) } }
method conjugate() { self.re - (self.im)i }
method polar() { self.abs, atan2(self.im, self.re); }
}
my class FatRat is Real {
method new($n,$d) { FatRat.succ * $n / $d }
Expand Down

0 comments on commit 519e0b6

Please sign in to comment.