iliekturtles / uom

Units of measurement -- type-safe zero-cost dimensional analysis
Apache License 2.0
1.02k stars 97 forks source link

enable cos and sin on `no_std` builds #283

Open wucke13 opened 2 years ago

wucke13 commented 2 years ago

Currently sin and cos functions are disabled on no_std. These are common functions which are easily available through libm, so it makes sense to expose them.

iliekturtles commented 2 years ago

They are currently disabled because the underlying implementations aren't available in core::f32 like they are in std::f32. Is there some way to use libm easily for no_std?

adamreichold commented 2 years ago

I think the libm crate can be used in no_std environments as it is a pure Rust reimplementation of MUSL's libm.

wucke13 commented 2 years ago

Yes, further on there is a libm feature in num, which can be easily used since num is a dependency already

wucke13 commented 2 years ago

@iliekturtles Any chance that you take you fix this?