dimforge / simba

Set of mathematical traits to facilitate the use of SIMD-based AoSoA (Array of Struct of Array) storage pattern.
Apache License 2.0
290 stars 29 forks source link

Implement most of missing functionality for fixed point #48

Closed richardhozak closed 8 months ago

richardhozak commented 1 year ago

This PR implements missing functionality for fixed point numbers that is needed for parry to use fixed point numbers as reals instead of f32 or f64.

Some of the functionality is generalized and some of it is implemented only for FixedI32F32 fixed point number, as that is what I used to test this with parry.

I would like to get this completed for all fixed point numbers, so parry or other crates can use arbitrary fixed point numbers, but I am not sure how to continue (there is some From conversions in fixed_point.rs that I know how to generalize, but I am not sure how to impl_float_simd! for all fixed point numbers).

Could anyone point me in correct direction in order for me to complete this?