Hi, there.
Right now, this is can happen when comparing two points: (100@50) < (100@60). "false" (100@50) > (100@60). "false" (100@50) = (100@60). "false" This is because one component is the same and implementation in Point is like this: < anotherPoint ^x < aPoint x and: [y < aPoint y] Hence, points do not have like magnitudes. For the aformentioned examples, a "fix" could be: < anotherPoint ^(self >= anotherPoint) not Now, the interesting thing is that event handling (mouse clicks etc.) becomes awkward after that. :-D Best, Marcel |
It might be that neither a <= b nor b <= a So Point is not a good candidate for Magnitude (side note: we had enough problems with Float nan which is unordered!) In short, why changing < is not a good idea? 1) there's no natural definition of <= 2) it breaks expectations In longer form: We could define some total order (Matlab did it for complex), there are infinitely many possible definitions, like sort x first, then y, or radius first, then angle, etc...Current definition of = has this property, but it's not total p >= topLeft and: [p <= bottomRight] In Matlab, defining < on complex has practically no interest (except when there's small imaginary residuals), but prevents programs to fail, delaying detection of errors. 2016-08-19 10:44 GMT+02:00 marcel.taeumel <[hidden email]>: Hi, there. |
2016-08-19 12:25 GMT+02:00 Nicolas Cellier <[hidden email]>:
|
Free forum by Nabble | Edit this page |