Update arc.rs with improved documentation

added units and improved description to field comments of Arc and Ellipse structs.
This commit is contained in:
Kxie 2023-08-07 17:35:26 +08:00 committed by Héctor Ramón Jiménez
parent f5b9562900
commit 76ffbbd06e
No known key found for this signature in database
GPG key ID: 140CC052C94F138E

View file

@ -8,9 +8,9 @@ pub struct Arc {
pub center: Point, pub center: Point,
/// The radius of the arc. /// The radius of the arc.
pub radius: f32, pub radius: f32,
/// The start of the segment's angle, clockwise rotation. /// The start of the segment's angle in radians, clockwise rotation from positive x-axis.
pub start_angle: f32, pub start_angle: f32,
/// The end of the segment's angle, clockwise rotation. /// The end of the segment's angle in radians, clockwise rotation from positive x-axis.
pub end_angle: f32, pub end_angle: f32,
} }
@ -19,13 +19,13 @@ pub struct Arc {
pub struct Elliptical { pub struct Elliptical {
/// The center of the arc. /// The center of the arc.
pub center: Point, pub center: Point,
/// The radii of the arc's ellipse, defining its axes. /// The radii of the arc's ellipse. The horizontal and vertical half-dimensions of the ellipse will match the x and y values of the radii vector.
pub radii: Vector, pub radii: Vector,
/// The rotation of the arc's ellipse. /// The clockwise rotation of the arc's ellipse.
pub rotation: f32, pub rotation: f32,
/// The start of the segment's angle, clockwise rotation. /// The start of the segment's angle in radians, clockwise rotation from positive x-axis.
pub start_angle: f32, pub start_angle: f32,
/// The end of the segment's angle, clockwise rotation. /// The end of the segment's angle in radians, clockwise rotation from positive x-axis.
pub end_angle: f32, pub end_angle: f32,
} }