PasteRack.org
Paste # 31457
2022-09-30 13:01:50

Fork as a new paste.

Paste viewed 464 times.


Embed:

  1. #lang racket
  2. (define (diffSquare a b)(expt(- a b)2))(define (distance x1 y1 x2 y2)(sqrt(+(diffSquare x2 x1)(diffSquare y2 y1))))
  3. (distance 2 1 7 10)

=>

10.295630140987