[Tutor] line class
Kent Johnson
kent37 at tds.net
Wed Jul 9 14:36:27 CEST 2008
On Wed, Jul 9, 2008 at 3:05 AM, Alan Gauld <alan.gauld at btinternet.com> wrote:
>
> Rather than comparing in that manner I'd take a different approach.
> I'd measure the length from the origin thus any point that was inside
> the circle upon whose ciorcumference the point sits is less than
> the point. Any point on the circumference is equal and any point
> outside the circle is greater...
That will allow points with different x and y values to compare equal
which would be a strange definition of equality.
> [ Another approach with similar results is to convert the coordinates
> into complex numbers and then use the complex number cmp method
> to compare those.
That just raises the question of how do complex numbers compare?
Kent
More information about the Tutor
mailing list