Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Float is deprecated #864

Closed
bvssvni opened this issue Apr 1, 2015 · 7 comments
Closed

Float is deprecated #864

bvssvni opened this issue Apr 1, 2015 · 7 comments

Comments

@bvssvni
Copy link
Member

bvssvni commented Apr 1, 2015

http://doc.rust-lang.org/std/num/trait.Float.html

Suggestions?

@bvssvni
Copy link
Member Author

bvssvni commented Apr 1, 2015

One idea is to copy the trait to a new library "float" and then add it as dependency to libraries such as vecmath.

@bvssvni
Copy link
Member Author

bvssvni commented Apr 1, 2015

Alternative is to use the ops traits Add, Sub, Mul etc. directly. This is the major usage.

To reduce code, one could add traits Ring and Field that gets auto implemented from the operations, and then use those as constraints.

@bvssvni
Copy link
Member Author

bvssvni commented Apr 1, 2015

On second thought, there is no point having Ring for a library that is designed to use floats.

@mitchmindtree
Copy link
Contributor

Woah, I didn't see this coming (for some reason I thought it was stable). The deprecation warning seems to suggest to use the rust-lang/num crate - perhaps the Float trait will get moved there?

@bvssvni
Copy link
Member Author

bvssvni commented Apr 2, 2015

I opened rust-num/num#74

@bvssvni
Copy link
Member Author

bvssvni commented Apr 2, 2015

The plan is to move the Float trait to the num library.

@bvssvni
Copy link
Member Author

bvssvni commented Apr 8, 2015

This is fixed in most libraries now, closing.

@bvssvni bvssvni closed this as completed Apr 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants