use-regular-polytope 0.0.6

Regular polytope primitives for the RustUse geometry workspace
Documentation
  • Coverage
  • 100%
    50 out of 50 items documented1 out of 34 items with examples
  • Size
  • Source code size: 14.12 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 908.63 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 7s Average build duration of successful builds.
  • all releases: 7s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-geometry
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-regular-polytope

Regular polytope primitives for the RustUse geometry workspace.

use-regular-polytope groups regular polygons, Platonic solids, and the convex regular four-dimensional polytopes. Named objects such as the 24-cell, 600-cell, and 120-cell are represented inside this family crate rather than as standalone crates. Schlafli notation is provided by the use-schlafli crate.

Example

use use_regular_polytope::{PlatonicSolid, RegularPolygon, RegularPolytope4};

let polygon = RegularPolygon::new(6, 2.0).expect("valid polygon");

assert_eq!(polygon.side_count(), 6);
assert_eq!(PlatonicSolid::Icosahedron.face_count(), 20);
assert_eq!(RegularPolytope4::TwentyFourCell.schlafli_symbol().to_string(), "{3, 4, 3}");