* Fixed "IllegalArgumentException: Comparison method violates its general contract!" issue with CollisionResults

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9618 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Sha..rd 12 years ago
parent ac0f3a107c
commit b0286ae5ff
  1. 7
      engine/src/core/com/jme3/collision/CollisionResult.java

@ -99,12 +99,7 @@ public class CollisionResult implements Comparable<CollisionResult> {
}
public int compareTo(CollisionResult other) {
if (distance < other.distance)
return -1;
else if (distance > other.distance)
return 1;
else
return 0;
return Float.compare(distance, other.distance);
}
@Override

Loading…
Cancel
Save