Function: pixel-scroll-calculate-velocity

pixel-scroll-calculate-velocity is a byte-compiled function defined in pixel-scroll.el.gz.

Signature

(pixel-scroll-calculate-velocity STATE)

Documentation

Calculate velocity from the kinetic state vector STATE.

Source Code

;; Defined in /usr/src/emacs/lisp/pixel-scroll.el.gz
(defun pixel-scroll-calculate-velocity (state)
  "Calculate velocity from the kinetic state vector STATE."
  (let* ((ring (aref state 0))
         (elts (ring-elements ring))
         (total 0))
    (dolist (tem elts)
      (setq total (+ total (cdr tem))))
    (* (/ total (- (float-time) (caar (last elts))))
       pixel-scroll-precision-initial-velocity-factor)))