Open ghost opened 11 years ago
In the book (p 47) it says the inverse mass is used for representing infinite mass
.. objects of infinite mass have a zero inverse mass
but the code in particle.cpp reads
bool Particle::hasFiniteMass() const { return inverseMass >= 0.0f; }
causing the bug
setInverseMass(0); hasFiniteMass() == true
agreed, probably best would be to check if inverse mass is equal to zero (of course using a bias to compensate for numerical precision). I will try to fix this and make a pull request.
In the book (p 47) it says the inverse mass is used for representing infinite mass
but the code in particle.cpp reads
causing the bug
setInverseMass(0); hasFiniteMass() == true