Pharo suffers from bad hash value for Float generating unexpected collisions on numbers as 0.5 and -0.5.
As a result Point item in DrGeo are too often seen as duplicated but there are not.
The proper way to fix this issue: in the Dr. Geo's Factory when there is
hash equality between two geometric items, it should then check for the
logical (ontological) equality of these two items
Code to implement it:
DrGFactory>>indexOf: anItem in: aPool
"No identity equality but hashed value to detect duplicated object we must consider as equal"
ifNotNil: [aPool findFirst: [ :each |
each hash = anItem hash
and: ["double check when hash is equal (can be a collision)"
each = anItem ]
You received this bug notification because you are a member of DrGeo
developers, which is subscribed to Dr. Geo II.
Matching subscriptions: Dr. Geo bug report
Status in Dr. Geo II:
We have collision between DrGPointIntersection and DrGSegment2Points
Althought parents of these two instances:
- two circles
- two point