scaledBy specification
This is the engineering specification for the MotionObservable operator: scaledBy.
Overview
scaledBy emits the result of multiplying the incoming value by a given value.
Example usage:
stream.scaled(by: 2)
upstream value | downstream
20 2 | 40
40 2 | 80
80 2 | 160
MVP
Expose a scaledBy operator API
Use _map to implement the operator. Accept a number value. Emit the result of incoming * value.
class MotionObservable {
public func scaled(by value: number) -> MotionObservable<number>