wimal Posted August 29, 2018 Posted August 29, 2018 How can I arrange list of point coordinates(x y ) ascending to X or Y Quote
Lee Mac Posted August 29, 2018 Posted August 29, 2018 Ascending x-coordinate: (vl-sort <point-list> '(lambda ( a b ) (< (car a) (car b)))) Ascending y-coordinate: (vl-sort <point-list> '(lambda ( a b ) (< (cadr a) (cadr b)))) Ascending x-coordinate, then y-coordinate: (vl-sort <point-list> '(lambda ( a b ) (if (equal (car a) (car b) 1e-8) (< (cadr a) (cadr b)) (< (car a) (car b))))) 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.