From ddea6ecf73ea2544a777fe988dfbb07e739bc28f Mon Sep 17 00:00:00 2001 From: David Sawatzke Date: Wed, 20 May 2020 21:38:22 +0200 Subject: [PATCH] Make Angle & Point public types --- src/lib.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 812247e..a8d4344 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,16 +7,17 @@ //! //! Every struct defined here is 2 dimensional and uses f64 -use euclid::{Angle, Point2D, Rotation2D, UnknownUnit}; +use euclid::{Point2D, Rotation2D, UnknownUnit}; -type Point = Point2D; +pub type Angle = euclid::Angle; +pub type Point = Point2D; type Vector2D = euclid::Vector2D; type Rotation = Rotation2D; /// Vector with origin, angle and magnitude pub struct Vector { pub origin: Point, - pub angle: Angle, + pub angle: Angle, pub magnitude: f64, } @@ -29,7 +30,7 @@ pub struct Circle { /// Circle route with a circle and a angle for how long to drive on this circle pub struct CircleRoute { pub circle: Circle, - pub angle: Angle, + pub angle: Angle, } /// Route with a start Circle, a tangent straight and a end Circle (eg. rsl, rsr, lsr, lsl)