File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 38
38
(assert (eps= (send f :distance (float-vector 200 0 100 )) (norm #f(100 100 ))))
39
39
))
40
40
41
+ ; ; test intersection3
42
+ ; ; https://github.com/euslisp/jskeus/pull/561
43
+ (deftest triangulation-intersection3 ()
44
+ (let ((l0 (make-line (float-vector -120.0 -30.0 0.0 ) (float-vector 15.0 0.0 0.0 )))
45
+ (l1 (make-line (float-vector -15.0 120.0 0.0 ) (float-vector -15.0 0.0 0.0 )))
46
+ res-p res-n)
47
+ (setq res-p (geo ::line-intersection3 (l0 . pvert) (l0 . nvert) (l1 . pvert) (l1 . nvert) 0.00001 )) ; ; -> (0.777778 1.05556)
48
+ (setq res-n (geo ::line-intersection3 (l1 . pvert) (l1 . nvert) (l0 . pvert) (l0 . nvert) 0.00001 )) ; ; -> (1.05556 0.777778)
49
+ (warn " ;;; intersection3 (res-p) ~A~% " res-p)
50
+ (warn " ;;; intersection3 (res-n) ~A~% " res-n)
51
+
52
+ (assert (eps= (elt res-p 0 ) (elt res-n 1 )))
53
+ (assert (eps= (elt res-p 1 ) (elt res-n 0 )))
54
+ ))
55
+
56
+
41
57
(eval-when (load eval )
42
58
(run-all-tests)
43
59
(exit))
You can’t perform that action at this time.
0 commit comments