Fixed point type for world coordinates
- Dominant language
- Rust
- Stars
- 926
- Forks
- 104
- PR merge metrics
- No merged PRs in 30d
Description
I think logically it makes more sense to use fixed-point to represent absolute coordinates.
Reasons to avoid floating-point:
- Precision depends on position. e.g., (0, 0, 1000000).
- People should avoid positions too far from the origin.
Fixed-point:
- Pro: guarantees position-invariant precision. Arguably bits are used more efficiently.
- Con: Hard max&min values, and have to take care of proper scaling.
But I would argue that anyways people should avoid positions too far from the origin, so the hard max&min values are not really bad, maybe even good because it makes the limitation more explicit.
Since ncollide abstracts the underlying number types. I think what we need here is a clear type distinction of absolute coordinate type and distance type. If user wants to use f32 for the both, it should be OK too.
related article: http://home.comcast.net/~tom_forsyth/blog.wiki.html#[[A%20matter%20of%20precision]]
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.