jamshred: update for iota
parent
816b47561a
commit
1408d017a9
|
@ -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
|
||||
|
|
|
@ -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 ;
|
||||
|
|
Loading…
Reference in New Issue