Skip to main content

Crate use_conic

Crate use_conic 

Source
Expand description

§use-conic

Conic primitives for the RustUse geometry workspace.

use-conic begins with named conic-family value types and lightweight validation. It does not attempt symbolic equation manipulation or fitting algorithms.

§Example

use use_conic::{ConicKind, Ellipse};
use use_point::Point2;

let ellipse = Ellipse::new(Point2::origin(), 4.0, 2.0).expect("positive radii");

assert_eq!(ellipse.kind(), ConicKind::Ellipse);
assert_eq!(ellipse.major_radius(), 4.0);

Structs§

Conic
A small conic descriptor.
Ellipse
An ellipse represented by a center and two positive radii.
Hyperbola
A hyperbola represented by a center and positive transverse/conjugate radii.
Parabola
A parabola descriptor using a vertex and focal parameter.

Enums§

ConicKind
The high-level family of a conic section.