distanceto semantics

Charles Goodwin <[email protected]> Tue, 13 Apr 2004 18:32:11 +0000
Newsgroups gmane.comp.java.xwt.core
Organization XWT Foundation
Message-ID <[email protected]>
Currently b1.distanceto(b2) gives the answer b1 - b2.

Shouldn't that be b2 - b1?

Ascii example:

.-----.
|b1   |           b1 origin  (0,  0)
|  .-----.        b2 origin (50, 50)
'--|b2   |
   |     |
   '-----'

Currently b1.distanceto(b2) returns {x:-50, y:-50}.  But wouldn't you
expect that to be (50,50)?

To me, 'b1.distanceto(b2)' reads "the distance from b1 to b2".
Currently it returns "the distance from b2 to b1".
-- 
- Charlie

Charles Goodwin <[email protected]>
Online @ www.charlietech.com