/// A torus. #[derive(PartialEq, Debug, Clone, RustcEncodable, RustcDecodable)] 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.clone() } /// The torus major radius. #[inline] pub fn major_radius(&self) -> N { self.major_radius.clone() } }