2 (in-package :cl-tuples
)
5 :tuple-element-type single-float
7 :elements
(sx sy ex ey
))
10 :tuple-element-type single-float
11 :initial-element
0.0f0
12 :elements
(sx sy sz ex ey ez
))
14 (def-tuple-op line-
>vector2d
15 ((line line2d
(sx sy ex ey
)))
17 (vector2d* (- ex sx
) (- ey sy
))))
19 (def-tuple-op line-start-
>vertex2d
20 ((line line2d
(sx sy ex ey
)))
24 (def-tuple-op line-end-
>vertex2d
25 ((line line2d
(sx sy ex ey
)))
30 (def-tuple-type line3d
31 :tuple-element-type single-float
32 :elements
(sx sy sz ex ey ez
))
34 (def-tuple-op line-
>vector3d
35 ((line line3d
(sx sy ex ey
)))
37 (vector3d* (- ex sx
) (- ey sy
) (- ez sz
))))
39 (def-tuple-op line-start-
>vertex3d
40 ((line line3d
(sx sy ex ey
)))
42 (vector3d* sx sy sz
)))
44 (def-tuple-op line-end-
>vertex3d
45 ((line line3d
(sx sy ex ey
)))
47 (vector3d* sx sy sz
)))