-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Ellipse functions #13025
Ellipse functions #13025
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.
This mostly looks good (I'd just like a little more in the way of sources); it would be nice to have some additional motivation beyond just "filling in the gaps" though (especially for something like focal length, where I don't really know what it's used for).
(a * a - b * b).sqrt() | ||
} | ||
|
||
#[inline(always)] |
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.
Do we want to always inline this function, considering it's a pretty long method?
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.
Most of it is just the const
array and excluding that, the method really isn't that long. In the end, this is probably a design decision, so if you believe it should be removed, I am happy to do so
Co-Authored-By: IQuick 143 <IQuick143cz@gmail.com>
Objective
Ellipse
Solution
Ellipse::perimeter()
and::focal_length()