bryanedds / Nu

Repository hosting the open-source Nu Game Engine and related projects.
MIT License
1.05k stars 152 forks source link

Assimp.Vector3 hash code algorithm seems incorrect (AssimpNET Issue) #693

Open bryanedds opened 7 months ago

bryanedds commented 7 months ago

Here's what ILSpy is showing as the definition -

// Assimp.Vector3D
/// <summary>
/// Returns a hash code for this instance.
/// </summary>
/// <returns>
/// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. 
/// </returns>
public override int GetHashCode()
{
    return X.GetHashCode() + Y.GetHashCode();
}

I noticed something amiss when I got the same hash from two different Assimp.BoundingBoxes.

I would file this, but the AssimpNET github seems to be archived - https://github.com/assimp/assimp-net

Are we sure that's the right archive?