       weight = i/@len * (e.l) # CUSTOMIZE this to interpret previous moves differently
       acc += weight * e.d
       acc_w += weight
-    acc / acc_w #returns average derivation: rate of change: px/ms
+    ret = (acc / acc_w) #returns average derivation: rate of change: px/ms
+    return   0 if Number.isNaN ret
+    return -10 if ret < -10
+    return  10 if ret >  10
+    ret
 
 
 # Ifce for listener

        else
          throw new Error "fireEvent: Couldn't find an event class for event '#{eventName}'."
      ev = doc.createEvent eventClass
      ev.initEvent eventName, true, true
      # All events created as bubbling and cancelable.
      ev.synthetic = true
      ev
      # allow detection of synthetic events
    # The second parameter says go ahead with the default action
    node.dispatchEvent ev, true
  else if node.fireEvent
    # IE-old school style
    event = doc.createEventObject()
    event.synthetic = true
    # allow detection of synthetic events
    node.fireEvent 'on' + eventName, event
  else
    node[eventName]() #node.click() etc.

# ---
# generated by js2coffee 2.2.0
## /LIB

DBG_SHOW_FOUND = false

# keeps track of last MAX positions and derivations, to compute overscroll
class Buf
  MAX = 50 #max_length: idx MAX == 0
  idx: 0
  len: 0
  arr: [{m:0, d:0, l:1}] #see @add for details

  constructor: (pos) ->
    @arr[0].p = pos
    @arr[0].t = new Date

  # returns DIFF from last
  # pos of mouse (as obtained from event)

# exists after dragger ends
class Overscroll
  constructor: (@speedX, @speedY, scrollerX, scrollerY)->
    console.log 'speed.xy', @speedX, @speedY if DBG_LOG_SPEED
    @mx = new Momentum @speedX, scrollerX.scroll if scrollerX and scrollerX.scrollable
    @my = new Momentum @speedY, scrollerY.scroll if scrollerY and scrollerY.scrollable
    @mx = @mx or stop:()->0 #if not scrollable: stub, so it can be 'stopped'
