   # * c = constant value, UIScrollView uses 0.55
   # * d = dimension, either width or height
   x = Math.abs(limit - y)
-  c = 0.55
+  c = ELASTIC_CONST
   d = refHeight
   b = (1 - (1 / ((x * c / d) + 1.0))) * d
   -b


stopKineticScrolling = ->
  clearInterval scrollTicker
  if Math.abs(velocity) > 10

    amplitude = AMPLITUDE_CONST * velocity
    target = Math.round(offset + amplitude)

    if target < min
      target = min
    else if target > max
      target = max

    if target is min or target is max
      pv = velocity
      velocity = Math.min Math.abs(velocity), MAX_EDGE_VELOCITY
      if pv < 0 then velocity *= -1
      amplitude = AMPLITUDE_CONST * velocity

    scrollTimestamp = Date.now()
    requestAnimationFrame => autoScroll.call @


autoScroll = ->


T_CONST = 325

ELASTIC_CONST = 0.55
AMPLITUDE_CONST = 0.7
MAX_EDGE_VELOCITY = 450

###*
# Start the view scrolling.
