[Fluxus] object placement (syntax question)
gabor papp
gabor.lists at mndl.hu
Mon Jan 18 23:42:40 PST 2010
hi Kassen,
a found two possible causes:
- the cond syntax is wrong, it should be
(cond [test-expr then-expr])
instead of
(cond test-expr then-expr)
- the result of andmap should not be negated probably, since you want to
make sure that all distances are bigger than the radius.
(define (position-cube)
(let ((spot (vector (* 4.5 (crndf)) (* 4.5 (crndf)) .5)))
(cond
[(andmap
(lambda (element)
(> (vdist spot (object-pos element))
(object-radius element)))
myworld)
(place-cube spot)])))
best,
gabor
More information about the Fluxus
mailing list