Struct rand::distributions::UnitSphereSurface [−][src]
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
Construct a new UnitSphereSurface
distribution.
Trait Implementations
Generate a random value of T
, using rng
as the source of randomness.
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
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
Mutably borrows from an owned value. Read more