use alga::general::Real; /// A torus. #[derive(PartialEq, Debug, Clone)] pub struct Torus { major_radius: N, minor_radius: N, } impl Torus { /// Creates a new torus with the given radiuses. #[inline] pub fn new(major_radius: N, minor_radius: N) -> Torus { Torus { major_radius: major_radius, minor_radius: minor_radius, } } } impl Torus { /// The torus minor radius. #[inline] pub fn minor_radius(&self) -> N { self.minor_radius } /// The torus major radius. #[inline] pub fn major_radius(&self) -> N { self.major_radius } }