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