Function: touch-screen-distance

touch-screen-distance is a byte-compiled function defined in touch-screen.el.gz.

Signature

(touch-screen-distance POS1 POS2)

Documentation

Compute the distance in pixels between POS1 and POS2.

Each is a coordinate whose car and cdr are respectively its X and Y values.

Source Code

;; Defined in /usr/src/emacs/lisp/touch-screen.el.gz
(defsubst touch-screen-distance (pos1 pos2)
  "Compute the distance in pixels between POS1 and POS2.
Each is a coordinate whose car and cdr are respectively its X and
Y values."
  (let ((v1 (- (cdr pos2) (cdr pos1)))
        (v2 (- (car pos2) (car pos1))))
    (abs (sqrt (+ (* v1 v1) (* v2 v2))))))