Enum spherical_cow::errors::SphericalCowError
[−]
[src]
pub enum SphericalCowError { NegativeRadius, NegativeExtents, Uncontained, NoneSetF, NoneFront, }
All errors thrown by the library
Variants
NegativeRadius
If a sphere is given a negative radius.
NegativeExtents
If a cuboid is given a negative half extent.
Uncontained
If a sphere is created but is not confined by the Container
.
This happens quite a lot and is generally handled silently. This error
is only thrown by the init_spheres
method. Usually this means the geometry
of the container is perhaps not aligned to the origin, it is scaled too small,
or the spheres you're attempting to pack are too large.
NoneSetF
We choose a random valuc from the set_f
vector. rand
returns an option and we pop
the value. If it's None
this error is thrown. Due to the contstuction of the
rest of the method, it's safe to say this is unreachable.
NoneFront
We choose a random valuc from the front
vector. rand
returns an option and we pop
the value. If it's None
this error is thrown. Due to the contstuction of the
rest of the method, it's safe to say this is unreachable.
Trait Implementations
impl Debug for SphericalCowError
[src]
impl Display for SphericalCowError
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more