- (define-module (math))
- ;; hopefully this module will provide some procedures to calculate
- ;; various mathematical formulas
- (define (double x)
- (* x x))
- (define (distance-xy-points (a b))
- (let ([x1 (car a)]
- [x2 (car b)]
- [y1 (car (cdr a))]
- [y2 (car (cdr b))])
- (sqrt (+ (double (abs (- x1 x2)))
- (double (abs (- y1 y2)))))))
|