The definition of the Complex type seems a little weak. A few things:
To get the Cartesian components of the value there are two methods (re
and im). In contrast there is just one method polar to return the
polar components of the value I'm not sure that this asymmetry is a good
thing.
On Wed, Dec 16, 2009 at 2:10 PM, Dave Whipp d...@dave.whipp.name wrote:
The definition of the Complex type seems a little weak. A few things:
To get the Cartesian components of the value there are two methods (re and
im). In contrast there is just one method polar to return the polar
Dave Whipp wrote:
The definition of the Complex type seems a little weak. A few things:
To get the Cartesian components of the value there are two methods (re
and im). In contrast there is just one method polar to return the
polar components of the value
Not quite, .abs returns one of the
At 00:15 +0100 12/17/09, Moritz Lenz wrote:
Not quite, .abs returns one of the polar coordinates (the magnitude), so
only a method is missing that returns the angle.
Any ideas for a good name?
In pre-computer times the angle was called the argument.
But that offers plenty of room for confusion
At 00:15 +0100 12/17/09, Moritz Lenz wrote:
Not quite, .abs returns one of the polar coordinates (the magnitude), so
only a method is missing that returns the angle.
Any ideas for a good name?
Would a method called phi with a unicode synonym φ be too obtuse?
-y
Moritz Lenz wrote:
our multi method polar (Complex $nim: -- [ Real $mag where 0..Inf,
Real $angle where -π ..^ π ]) is export { ... }
If you put this into a signature, it is checked on every call to that
method and thus slows down execution. If you want a formalization that's
not part of
yary wrote:
At 00:15 +0100 12/17/09, Moritz Lenz wrote:
Not quite, .abs returns one of the polar coordinates (the magnitude), so
only a method is missing that returns the angle.
Any ideas for a good name?
Would a method called phi with a unicode synonym φ be too obtuse?
Anything wrong
On Dec 16, 2009, at 19:46 , Dave Whipp wrote:
yary wrote:
At 00:15 +0100 12/17/09, Moritz Lenz wrote:
Not quite, .abs returns one of the polar coordinates (the
magnitude), so
only a method is missing that returns the angle.
Any ideas for a good name?
Would a method called phi with a unicode