Struct rand::distributions::UnitCircle
source · pub struct UnitCircle;
👎Deprecated since 0.7.0: moved to rand_distr crate
Expand description
Samples uniformly from the edge of the unit circle in two dimensions.
Implemented via a method by von Neumann1.
von Neumann, J. (1951) Various Techniques Used in Connection with Random Digits. NBS Appl. Math. Ser., No. 12. Washington, DC: U.S. Government Printing Office, pp. 36-38. ↩
Implementations§
source§impl UnitCircle
impl UnitCircle
sourcepub fn new() -> UnitCircle
pub fn new() -> UnitCircle
Construct a new UnitCircle
distribution.
Trait Implementations§
source§impl Clone for UnitCircle
impl Clone for UnitCircle
source§fn clone(&self) -> UnitCircle
fn clone(&self) -> UnitCircle
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for UnitCircle
impl Debug for UnitCircle
source§impl Distribution<[f64; 2]> for UnitCircle
impl Distribution<[f64; 2]> for UnitCircle
impl Copy for UnitCircle
Auto Trait Implementations§
impl RefUnwindSafe for UnitCircle
impl Send for UnitCircle
impl Sync for UnitCircle
impl Unpin for UnitCircle
impl UnwindSafe for UnitCircle
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more