Merge pull request #10 from phoe-trash/master
[vecto.git] / vectometry / operations.lisp
blobb2ed7fffee9fc7970722934c75ac91b2167be156
1 ;;;; operations.lisp
3 (in-package #:vecto-geometry)
5 (defgeneric combine (a b)
6 (:method (a b)
7 (box (min (xmin a) (xmin b))
8 (min (ymin a) (ymin b))
9 (max (xmax a) (xmax b))
10 (max (ymax a) (ymax b))))
11 (:method ((a null) b)
12 (box (xmin b) (ymin b)
13 (xmax b) (ymax b)))
14 (:method (a (b null))
15 (box (xmin a) (ymin a)
16 (xmax a) (ymax a))))