This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
Fix edge case in composite function interpolation - #8613
Merged
Merged
Conversation
added 2 commits
April 1, 2017 08:54
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>({ |
Contributor
There was a problem hiding this comment.
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>({ |
Contributor
There was a problem hiding this comment.
Similarly, I'd expect 66.0.
Contributor
Author
|
@jfirebaugh thanks for the review. Updated to hold function constant outside the min,max stop range. |
jfirebaugh
approved these changes
Apr 3, 2017
jfirebaugh
left a comment
Contributor
There was a problem hiding this comment.
@kkaefer, any hints about the CircleCI build failure here?
This file contains hidden or 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
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)