-
Notifications
You must be signed in to change notification settings - Fork 49
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
Implement rand::Rand #12
Comments
As an optional feature, sure! |
|
@vks Do you have more information about that? What's the replacement? |
@cuviper It will be replaced with something similar, see dhardy/rand#83. |
Hmm. It seems fine to go ahead and support |
@vks If we decide to stick to supporting Rust 1.8 for num-complex, that won't be an issue as rand v0.4+ won't even compile on rustc 1.8.0 |
14: Implementing rand::Rand r=cuviper a=shingtaklam1324 Implements #12 . Right now it is implemented with calling `rng.gen::<T>()` for both the real and imaginary parts. I'm not 100% sure on the mathematical randomness of the distribution if the complex number is used as a vector and the angle is wanted. As well as that, for the dependency on `rand`, I just pulled the newest version on crates.io, but it may be better to use another version. I don't have many projects that use this so I'm not sure how big of an issue this will be. Changes: - Optional `rand` feature and dependency on `rand` - `impl<T> rand::Rand for Complex<T>`
Done in #14. |
num-complex::Complex<T>
should implementrand::Rand
ifT: Rand
is assured.The text was updated successfully, but these errors were encountered: