SingleWorldMesh: also compare for equals

Fixes Comparison method violates its general contract! errors
This commit is contained in:
Bixilon 2023-05-30 02:48:30 +02:00
parent be23b57cdc
commit cca78d24a5
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -45,10 +45,9 @@ class SingleWorldMesh(context: RenderContext, initialCacheSize: Int, onDemand: B
}
override fun compareTo(other: SingleWorldMesh): Int {
if (distance < other.distance) {
return -1
}
return 1
if (distance < other.distance) return -1
if (distance > other.distance) return 1
return 0
}
data class WorldMeshStruct(