Struct rand::distributions::UnitSphereSurface
source · pub struct UnitSphereSurface;
👎Deprecated since 0.7.0: moved to rand_distr crate
Expand description
Samples uniformly from the surface of the unit sphere in three dimensions.
Implemented via a method by Marsaglia1.
Marsaglia, George (1972). Choosing a Point from the Surface of a Sphere. Ann. Math. Statist. 43, no. 2, 645–646. ↩
Implementations§
source§impl UnitSphereSurface
impl UnitSphereSurface
sourcepub fn new() -> UnitSphereSurface
pub fn new() -> UnitSphereSurface
Construct a new UnitSphereSurface
distribution.
Trait Implementations§
source§impl Clone for UnitSphereSurface
impl Clone for UnitSphereSurface
source§fn clone(&self) -> UnitSphereSurface
fn clone(&self) -> UnitSphereSurface
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 UnitSphereSurface
impl Debug for UnitSphereSurface
source§impl Distribution<[f64; 3]> for UnitSphereSurface
impl Distribution<[f64; 3]> for UnitSphereSurface
impl Copy for UnitSphereSurface
Auto Trait Implementations§
impl RefUnwindSafe for UnitSphereSurface
impl Send for UnitSphereSurface
impl Sync for UnitSphereSurface
impl Unpin for UnitSphereSurface
impl UnwindSafe for UnitSphereSurface
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