Objects of different type are different

This commit is contained in:
Pascal Serrarens 2024-04-18 17:33:28 +02:00
parent c9d2990da7
commit 6dea063a4a

View File

@ -21,6 +21,8 @@ InterestingThing::InterestingThing(Sensor *sensor, Spherical position,
bool InterestingThing::IsTheSameAs(InterestingThing *otherObj) {
if (id != 0 && id == otherObj->id)
return true;
if (type != otherObj->type)
return false;
if (fabsf(position.distance - otherObj->position.distance) > equalityDistance)
return false;
if (fabsf(position.horizontalAngle - otherObj->position.horizontalAngle) >