Stupid mistake is stupid :
public override bool Equals(object other)
{
if (!(other is Vector3)) // should be Vector3d
return false;
Vector3d vector3d = (Vector3d)other; // InvalidCastException when other isn't a Vector3d
if (x.Equals(vector3d.x) && y.Equals(vector3d.y))
return z.Equals(vector3d.z);
return false;
}
Notably can cause issues for boxed Vector3d instances when inside object collections (which is a weird use case, but still).