-
Notifications
You must be signed in to change notification settings - Fork 322
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
Allow zeroth order derivative for Bezier Curve #3596
Allow zeroth order derivative for Bezier Curve #3596
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.
One minor comment, but otherwise looks good.
@pepbos I think one reviewer for this change is fine, max two.
"SegmentedQuinticBezierToolkit::calcQuinticBezierCurveDerivU", | ||
"Error: order must be greater than."); | ||
"Error: order must be greater than zero."); |
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.
Should be "...greater than or equal to zero."
@nickbianco thanks for reviewing :) |
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.
LGTM.
…DomainBug Fixes bug introduced by #3596 when handling NaNs.
This PR changes
calcValue
to be a special case ofcalcDerivative
with order zero.This allows for less if / else switches further down the line and focuses calculations to a single function body.
Otherwise does not change the output of
calcValue
orcalcDerivative
.Brief summary of changes
In
SmoothSegmentedFunction
calcDerivative
allows order zero.calcValue
callscalcDerivative
with order zero.Similarly, in
SegmentedQuinticBezierToolkit
:calcQuinticBezierCurveDerivU
andcalcQuinticBezierCurveDYDX
allow for order zero.calcQuinticBezierCurveCurveVal
callscalcQuinticBezierCurveDerivU
with order zero.Changed
MustThrow
unit test accordingly.Testing I've completed
CHANGELOG.md
Change too minor?
This change is