Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update arc.rs with improved documentation #2008

Merged
merged 2 commits into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `TextInput` pasting text when `Alt` key is pressed. [#2006](https://github.com/iced-rs/iced/pull/2006)
- Broken link to old `iced_native` crate in `README`. [#2024](https://github.com/iced-rs/iced/pull/2024)
- `Rectangle::contains` being non-exclusive. [#2017](https://github.com/iced-rs/iced/pull/2017)
- Documentation for `Arc` and `arc::Elliptical`. [#2008](https://github.com/iced-rs/iced/pull/2008)

Many thanks to...

Expand Down Expand Up @@ -115,6 +116,7 @@ Many thanks to...
- @rs017991
- @tarkah
- @thunderstorm010
- @ua-kxie
- @wash2
- @wiiznokes

Expand Down
12 changes: 6 additions & 6 deletions graphics/src/geometry/path/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ pub struct Arc {
pub center: Point,
/// The radius of the arc.
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,
/// 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,
}

Expand All @@ -19,13 +19,13 @@ pub struct Arc {
pub struct Elliptical {
/// The center of the arc.
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,
/// The rotation of the arc's ellipse.
/// The clockwise rotation of the arc's ellipse.
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,
/// 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,
}

Expand Down
Loading