pub struct Hypersphere<const N: usize> { /* private fields */ }Expand description
An n-sphere represented by its topological dimension and radius.
Implementations§
Source§impl<const N: usize> Hypersphere<N>
impl<const N: usize> Hypersphere<N>
Sourcepub const fn new(radius: f64) -> Option<Hypersphere<N>>
pub const fn new(radius: f64) -> Option<Hypersphere<N>>
Creates an n-sphere with a positive finite radius.
Sourcepub const fn ambient_dimension(self) -> usize
pub const fn ambient_dimension(self) -> usize
Returns the ambient Euclidean dimension.
Trait Implementations§
Source§impl<const N: usize> Clone for Hypersphere<N>
impl<const N: usize> Clone for Hypersphere<N>
Source§fn clone(&self) -> Hypersphere<N>
fn clone(&self) -> Hypersphere<N>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const N: usize> Debug for Hypersphere<N>
impl<const N: usize> Debug for Hypersphere<N>
Source§impl<const N: usize> PartialEq for Hypersphere<N>
impl<const N: usize> PartialEq for Hypersphere<N>
Source§fn eq(&self, other: &Hypersphere<N>) -> bool
fn eq(&self, other: &Hypersphere<N>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<const N: usize> Copy for Hypersphere<N>
impl<const N: usize> StructuralPartialEq for Hypersphere<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for Hypersphere<N>
impl<const N: usize> RefUnwindSafe for Hypersphere<N>
impl<const N: usize> Send for Hypersphere<N>
impl<const N: usize> Sync for Hypersphere<N>
impl<const N: usize> Unpin for Hypersphere<N>
impl<const N: usize> UnsafeUnpin for Hypersphere<N>
impl<const N: usize> UnwindSafe for Hypersphere<N>
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