Implement lowerBound and upperBound operators.
ClosedPublic

Authored by markwei on Apr 5 2017, 5:19 PM.

Diff Detail

Repository
rMDMSTREAMSANDROID reactive-motion-android
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
markwei created this revision.Apr 5 2017, 5:19 PM
Restricted Application added a reviewer: O2: Material Motion. · View Herald TranscriptApr 5 2017, 5:19 PM
Restricted Application added a project: Material Motion. · View Herald Transcript
Restricted Application added a reviewer: O6: Material Android platform reviewers. · View Herald Transcript
Restricted Application added a reviewer: Material Motion. · View Herald Transcript
Restricted Application failed to build Restricted Buildable!Apr 5 2017, 5:21 PM
featherless requested changes to this revision.Apr 8 2017, 7:51 PM
featherless added a subscriber: featherless.
featherless added inline comments.
library/src/main/java/com/google/android/material/motion/operators/CommonOperators.java
117

I'm not sure if I'm misreading the Java docs for compareTo.

lowerBound's spec defines that the emitted value should never be lower than lowerBound.

This code appears to say "If lowerBound is less than value, emit lowerBound. Otherwise, emit value." This implementation sounds like upperBound.

Is it possible these implementations are reversed?

This revision now requires changes to proceed.Apr 8 2017, 7:51 PM
markwei updated this revision to Diff 10715.Apr 11 2017, 6:33 PM

Flip lower/upper impl

library/src/main/java/com/google/android/material/motion/operators/CommonOperators.java
117

You're right. Tests confirm.

Restricted Application failed to build Restricted Buildable!Apr 11 2017, 6:35 PM
featherless accepted this revision.Apr 12 2017, 1:40 AM
This revision is now accepted and ready to land.Apr 12 2017, 1:40 AM
This revision was automatically updated to reflect the committed changes.