jamshred: update for iota

db4
Slava Pestov 2010-01-15 06:19:20 +13:00
parent 816b47561a
commit 1408d017a9
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ CONSTANT: wall-drawing-offset 0.15
: equally-spaced-radians ( n -- seq )
#! return a sequence of n numbers between 0 and 2pi
dup [ / pi 2 * * ] curry map ;
[ iota ] keep [ / pi 2 * * ] curry map ;
: draw-segment-vertex ( segment theta -- )
over color>> gl-color segment-vertex-and-normal

View File

@ -34,7 +34,7 @@ C: <oint> oint
: random-float+- ( n -- m )
#! find a random float between -n/2 and n/2
dup 10000 * >fixnum random 10000 / swap 2 / - ;
dup 10000 * >integer iota random 10000 / swap 2 / - ;
: random-turn ( oint theta -- )
2 / 2dup random-float+- left-pivot random-float+- up-pivot ;