-
Notifications
You must be signed in to change notification settings - Fork 71
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
Add more docs. #366
Add more docs. #366
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lovely, thanks!
There is one nascent bug which this has made obvious but doesn't need to fix, but which does need addressing.
/// | ||
/// Equivalent to `self * Affine::rotate_about(th)` | ||
/// | ||
/// [rotation]: Affine::rotate_about | ||
#[inline] | ||
#[must_use] | ||
pub fn pre_rotate_about(self, th: f64, center: Point) -> Self { | ||
Affine::rotate_about(th, center) * self |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs to be:
Affine::rotate_about(th, center) * self | |
self * Affine::rotate_about(th, center) |
Although that might be for a different PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be a separate PR. I think the core is wrong here, not the doc comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I meant was that I too think the code is wrong and this is a docs patch, so I'd rather handle it separately. :)
/// with `width` and `height` [rounded towards] zero to the nearest integer, | ||
/// unless they are already an integer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An optional suggestion - I'd slightly prefer this to be something like:
/// with `width` and `height` [rounded towards] zero to the nearest integer, | |
/// unless they are already an integer. | |
/// with `width` and `height` [truncated][rounded towards] to their integer part. | |
/// This effectively rounds them to the nearest integer towards zero. |
I don't think "rounds towards zero to the nearest integer" flows very well, because in my mind "towards zero" is a modifier on the entire "rounds to the nearest integer".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather this one be addressed separately as this sort of text is in more than one place.
d4054f3
to
02b73a9
Compare
No description provided.