yLockedTo specification
This is the engineering specification for the MotionObservable
operator: yLockedTo
.
Overview
yLockedTo
sets the upstream point’s y value to the provided value and emits the result.
Example usage
stream.yLocked(to: 50)
upstream yValue | downstream
20, 50 50 | 20, 50
40, 80 50 | 40, 50
60, 90 50 | 60, 50
MVP
Expose an yLockedTo operator API
Use _map
to implement the operator. Accept an yValue number. Emit {upstream.x, yValue}
.
class MotionObservable<number> {
public func yLocked(to yValue: number) -> MotionObservable<Point>
}