It never decrements if we don't multiply the new value by result of positiveOrNegative():
Fix with this:
scan((acc: number, curr: number) => acc + params.increment * curr)
Also we must be sure last emitted value corresponds to the endValue
Fix with endWith() after takeWhile():
takeWhile(...),
// Make sure that last emitted value is end value
endWith(params.end)
It never decrements if we don't multiply the new value by result of
positiveOrNegative():Fix with this:
Also we must be sure last emitted value corresponds to the endValue
Fix with
endWith()aftertakeWhile():