pub struct HyperPoint4D {
pub x0: f32,
pub x1: f32,
pub x2: f32,
pub x3: f32,
pub x4: f32,
}Expand description
A point in the hyperboloid model of ℍ⁴. Satisfies: x₀² − x₁² − x₂² − x₃² − x₄² = 1, x₀ > 0. Components: (x0=time, x1..x4=space).
Fields§
§x0: f32§x1: f32§x2: f32§x3: f32§x4: f32Implementations§
Source§impl HyperPoint4D
impl HyperPoint4D
pub fn new(x0: f32, x1: f32, x2: f32, x3: f32, x4: f32) -> Self
pub fn minkowski_dot(&self, other: &Self) -> f32
Sourcepub fn normalize(&self) -> Self
pub fn normalize(&self) -> Self
Normalize back onto the hyperboloid after floating-point drift.
pub fn to_klein(&self) -> Vec4H
pub fn to_poincare(&self) -> Vec4H
Trait Implementations§
Source§impl Clone for HyperPoint4D
impl Clone for HyperPoint4D
Source§fn clone(&self) -> HyperPoint4D
fn clone(&self) -> HyperPoint4D
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 moreimpl Copy for HyperPoint4D
Source§impl Debug for HyperPoint4D
impl Debug for HyperPoint4D
Source§impl<'de> Deserialize<'de> for HyperPoint4D
impl<'de> Deserialize<'de> for HyperPoint4D
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for HyperPoint4D
impl PartialEq for HyperPoint4D
Source§impl Serialize for HyperPoint4D
impl Serialize for HyperPoint4D
impl StructuralPartialEq for HyperPoint4D
Auto Trait Implementations§
impl Freeze for HyperPoint4D
impl RefUnwindSafe for HyperPoint4D
impl Send for HyperPoint4D
impl Sync for HyperPoint4D
impl Unpin for HyperPoint4D
impl UnsafeUnpin for HyperPoint4D
impl UnwindSafe for HyperPoint4D
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