Closed
Description
Are there plans for moving stuff like this into the core crate? I am doing embedded stuff and currently I would like to use the brand spanking new mod_euc methods for floats and can't.
error[E0599]: no method named `mod_euc` found for type `f32` in the current scope
--> src/main.rs:46:23
|
46 | let r = (5.0_f32).mod_euc(2.0);
| ^^^^^^^
I found this comment that just points to an ease of first implementation as the reason for this being in the std crate. Are there any other reasons for this? If not, I could try to pull this and some related functionality from std to core crate.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
petoknm commentedon Oct 6, 2018
.abs()
is also handy to have in no_std environments sometimes[-]libcore and f32::mod_euc[/-][+]libcore and f32::{abs, mod_euc}[/+]Centril commentedon Oct 6, 2018
I would suggest writing up a PR; if it can be in libcore I see no reason why it shouldn't.
petoknm commentedon Oct 6, 2018
Seems like this exact issue is already being discussed in: