Dr.Lube
Guest
Bye to all,
strangely I can't verify an equality between two list elements, probably the command is wrong as I tried equal and =
(7161.94 502.645) (7199.16 524.131) (7145.33 617.361) (7108.12 595.875)
and pnt_a = (7161.94 502.645)
equal mi da sempre t, = I've always been
Where's the mistake?
thanks, dennis
ps. I know I can solve this, but is there a more elegant way?
strangely I can't verify an equality between two list elements, probably the command is wrong as I tried equal and =
Code:
(cond (equal pnt_a (nth 1 list_points))
(setq list_points (nth 1 list_points) (nth 2 list_points) (nth 3 list_points) (nth 0 list_points)))
)
(equal pnt_a (nth 2 list_points))
(setq list_points (nth 2 list_points) (nth 3 list_points) (nth 0 list_points) (nth 1 list_points)))
)
(equal pnt_a (nth 3 list_points))
(setq list_points (nth 3 list_points) (nth 0 list_points) (nth 1 list_points) (nth 2 list_points)))
)
)
and pnt_a = (7161.94 502.645)
equal mi da sempre t, = I've always been
Where's the mistake?
thanks, dennis
ps. I know I can solve this, but is there a more elegant way?
Code:
(cond ((and (= (nth 0 pnt_a) (nth 0 (nth 1 lista_punti))) (= (nth 1 pnt_a) (nth 1 (nth 1 lista_punti))))
(setq lista_punti (list (nth 1 lista_punti) (nth 2 lista_punti) (nth 3 lista_punti) (nth 0 lista_punti)))
)
((and (= (nth 0 pnt_a) (nth 0 (nth 2 lista_punti))) (= (nth 1 pnt_a) (nth 1 (nth 2 lista_punti))))
(setq lista_punti (list (nth 2 lista_punti) (nth 3 lista_punti) (nth 0 lista_punti) (nth 1 lista_punti)))
)
((and (= (nth 0 pnt_a) (nth 0 (nth 3 lista_punti))) (= (nth 1 pnt_a) (nth 1 (nth 3 lista_punti))))
(setq lista_punti (list (nth 3 lista_punti) (nth 0 lista_punti) (nth 1 lista_punti) (nth 2 lista_punti)))
)
)