parry icon indicating copy to clipboard operation
parry copied to clipboard

Migrate to "use" instead of alias pattern for `Real`

Open ThierryBerger opened this issue 1 year ago • 1 comments

As a new user opening rapier, it can be overwhelming to see Real used everywhere, rapier uses heavily generic code, so thriving to limit indirection can help.

// This can be gated behind a feature flag for f64 or f32.
use f64 as Real;

pub fn takes_a_real(param: Real) {}
use_pattern_doc

Idea credit to Alice from bevy ; and https://www.reddit.com/r/rust/comments/1e0trid/comment/lcpjwh4.

ThierryBerger avatar Jul 11 '24 19:07 ThierryBerger

  • while #223 improves the behavior, I'll keep this open until we investigate ideas from https://github.com/dimforge/parry/pull/232 properly.

ThierryBerger avatar Jul 18 '24 15:07 ThierryBerger