pub struct Gec<S: Scalar, const DIM: usize>(pub [S; DIM]);Tuple Fields§
§0: [S; DIM]Implementations§
Source§impl<S: ScalarFloat, const DIM: usize> Gec<S, DIM>
impl<S: ScalarFloat, const DIM: usize> Gec<S, DIM>
Source§impl<S: RandFloat, const DIM: usize> Gec<S, DIM>
impl<S: RandFloat, const DIM: usize> Gec<S, DIM>
pub fn random<R: RngCore + ?Sized>(r: &mut R) -> Self
pub fn random_openclosed<R: RngCore + ?Sized>(r: &mut R) -> Self
pub fn random_unit<R: RngCore + ?Sized>(rng: &mut R) -> Self
Sourcepub fn random_on_hemisphere<R: RngCore + ?Sized>(
rng: &mut R,
normal: Self,
) -> Self
pub fn random_on_hemisphere<R: RngCore + ?Sized>( rng: &mut R, normal: Self, ) -> Self
unit vector with angle < pi relative to the provided normal direction
pub fn random_in_unit_disk<R: RngCore + ?Sized>(rng: &mut R) -> Self
Trait Implementations§
Source§impl<S: Scalar + AddAssign, const DIM: usize> AddAssign<&Gec<S, DIM>> for Gec<S, DIM>
impl<S: Scalar + AddAssign, const DIM: usize> AddAssign<&Gec<S, DIM>> for Gec<S, DIM>
Source§fn add_assign(&mut self, rhs: &Gec<S, DIM>)
fn add_assign(&mut self, rhs: &Gec<S, DIM>)
Performs the
+= operation. Read moreSource§impl<T: Scalar + AddAssign, const DIM: usize> AddAssign for Gec<T, DIM>
impl<T: Scalar + AddAssign, const DIM: usize> AddAssign for Gec<T, DIM>
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl<S: Scalar + DivAssign, const DIM: usize> DivAssign<&Gec<S, DIM>> for Gec<S, DIM>
impl<S: Scalar + DivAssign, const DIM: usize> DivAssign<&Gec<S, DIM>> for Gec<S, DIM>
Source§fn div_assign(&mut self, rhs: &Gec<S, DIM>)
fn div_assign(&mut self, rhs: &Gec<S, DIM>)
Performs the
/= operation. Read moreSource§impl<S: Scalar + DivAssign, const DIM: usize> DivAssign for Gec<S, DIM>
impl<S: Scalar + DivAssign, const DIM: usize> DivAssign for Gec<S, DIM>
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/= operation. Read moreSource§impl<S: Scalar, const NROWS: usize, const NCOLS: usize> Mul<Gec<S, NCOLS>> for &Mat<S, NROWS, NCOLS>
impl<S: Scalar, const NROWS: usize, const NCOLS: usize> Mul<Gec<S, NCOLS>> for &Mat<S, NROWS, NCOLS>
Source§impl<S: Scalar, const NROWS: usize, const NCOLS: usize> Mul<Gec<S, NCOLS>> for Mat<S, NROWS, NCOLS>
impl<S: Scalar, const NROWS: usize, const NCOLS: usize> Mul<Gec<S, NCOLS>> for Mat<S, NROWS, NCOLS>
Source§impl<S: Scalar + MulAssign, const DIM: usize> MulAssign<&Gec<S, DIM>> for Gec<S, DIM>
impl<S: Scalar + MulAssign, const DIM: usize> MulAssign<&Gec<S, DIM>> for Gec<S, DIM>
Source§fn mul_assign(&mut self, rhs: &Gec<S, DIM>)
fn mul_assign(&mut self, rhs: &Gec<S, DIM>)
Performs the
*= operation. Read moreSource§impl<T: Scalar + MulAssign, const DIM: usize> MulAssign for Gec<T, DIM>
impl<T: Scalar + MulAssign, const DIM: usize> MulAssign for Gec<T, DIM>
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreSource§impl<S: Scalar + SubAssign, const DIM: usize> SubAssign<&Gec<S, DIM>> for Gec<S, DIM>
impl<S: Scalar + SubAssign, const DIM: usize> SubAssign<&Gec<S, DIM>> for Gec<S, DIM>
Source§fn sub_assign(&mut self, rhs: &Gec<S, DIM>)
fn sub_assign(&mut self, rhs: &Gec<S, DIM>)
Performs the
-= operation. Read moreSource§impl<S: Scalar + SubAssign, const DIM: usize> SubAssign for Gec<S, DIM>
impl<S: Scalar + SubAssign, const DIM: usize> SubAssign for Gec<S, DIM>
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl<S: Copy + Scalar, const DIM: usize> Copy for Gec<S, DIM>
Auto Trait Implementations§
impl<S, const DIM: usize> Freeze for Gec<S, DIM>where
S: Freeze,
impl<S, const DIM: usize> RefUnwindSafe for Gec<S, DIM>where
S: RefUnwindSafe,
impl<S, const DIM: usize> Send for Gec<S, DIM>where
S: Send,
impl<S, const DIM: usize> Sync for Gec<S, DIM>where
S: Sync,
impl<S, const DIM: usize> Unpin for Gec<S, DIM>where
S: Unpin,
impl<S, const DIM: usize> UnwindSafe for Gec<S, DIM>where
S: UnwindSafe,
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