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

Merge #14 #1

Merged
merged 1 commit into from
Mar 7, 2018
Merged

Merge #14 #1

merged 1 commit into from
Mar 7, 2018

Conversation

shingtaklam1324
Copy link
Owner

14: Implementing rand::Rand r=cuviper a=shingtaklam1324

Implements rust-num#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>

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>`
@shingtaklam1324 shingtaklam1324 merged commit 88bc0bd into shingtaklam1324:master Mar 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant