Revert "mutational flatten"

This reverts commit d1e81308d6.
main
Matthew Butterick 4 years ago
parent ce094d40b9
commit 7d2141ae56

@ -128,9 +128,8 @@
[(list ∆x ∆y) (sqrt (+ (expt ∆x 2) (expt ∆y 2)))]))
(define (flatten-quad q)
(define elems (quad-elems q))
(cons (quad-update! q [elems null])
(apply append (map flatten-quad elems))))
(cons (struct-copy quad q [elems null])
(apply append (map flatten-quad (quad-elems q)))))
(define (bounding-box . qs-in)
;; size of box that holds q and all subqs, based on reported origin and size

Loading…
Cancel
Save