Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finite Mass #23

Open
ghost opened this issue May 21, 2013 · 1 comment
Open

Finite Mass #23

ghost opened this issue May 21, 2013 · 1 comment

Comments

@ghost
Copy link

ghost commented May 21, 2013

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

@giordi91
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant