Skip to main content

Crate use_hypersphere

Crate use_hypersphere 

Source
Expand description

§use-hypersphere

Higher-dimensional sphere primitives for the RustUse geometry workspace.

use-hypersphere keeps n-sphere vocabulary lightweight: dimension metadata, radius storage, and simple constructors. Ordinary three-dimensional sphere measurements live in use-sphere.

§Example

use use_hypersphere::{Hypersphere, ThreeSphere};

let sphere = Hypersphere::<3>::new(2.0).expect("valid hypersphere");
let three_sphere = ThreeSphere::new(2.0).expect("valid 3-sphere");

assert_eq!(sphere.dimension(), 3);
assert_eq!(three_sphere.dimension(), 3);

Structs§

Hypersphere
An n-sphere represented by its topological dimension and radius.

Type Aliases§

ThreeSphere
A 3-sphere, the boundary of a four-dimensional ball.