This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix edge case in composite function interpolation #8613
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The failing cases here are: - Should interpolate before the first stop - Should interpolate past the last stop
jfirebaugh
reviewed
Apr 3, 2017
}), 0.0f) | ||
.evaluate(2.0f, oneInteger, -1.0f)) << "Should interpolate between stops"; | ||
|
||
EXPECT_EQ(0.0, CompositeFunction<float>("property", CompositeExponentialStops<float>({ |
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.
Shouldn't the expected result be 33.0
? Functions of all types are supposed to be flat before their first stop.
}), 0.0f) | ||
.evaluate(0.0f, oneInteger, -1.0f)) << "Should interpolate before the first stop"; | ||
|
||
EXPECT_EQ(99.0, CompositeFunction<float>("property", CompositeExponentialStops<float>({ |
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.
Similarly, I'd expect 66.0
.
@jfirebaugh thanks for the review. Updated to hold function constant outside the min,max stop range. |
jfirebaugh
approved these changes
Apr 3, 2017
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.
@kkaefer, any hints about the CircleCI build failure here?
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes a bug where, for a zoom value greater than that of the highest zoom
stop, composite function interpolation would return
nan
. (Blocking a rendertest over in #8593)