Skip to content

Adding CoefficientCombineRule of GeometricMean #685

Open
@teenangst

Description

@teenangst

Average is good but, for an object with 0.1 and 0.9 you'd expect it to be on the lower end while with Average you get 0.5, with GeometricMean you get sqrt(0.1 * 0.9)=0.3

It feels more realistic. If the values are equal the result is the same, so 0.8 and 0.8 is 0.8. If one of the objects is perfectly inelastic the result is 0 as you are multiplying by 0 inside the square root; with Average, colliding with something perfectly inelastic would still result in a bounce but it's perfectly inelastic and shouldn't.

I tried to fork and make the changes but had trouble with the Cargo.toml, it's been a while since I've done Rust, so I couldn't see if doing (coeff1 * coeff2).sqrt() would work as the coefficients are crate::math::Reals and I'm obviously not making a pull request with untested code.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions