]> gitweb.factorcode.org Git - factor.git/commitdiff
boids: population needs to be an integer for slicing.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sat, 23 Apr 2016 17:19:42 +0000 (10:19 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 23 Apr 2016 17:19:42 +0000 (10:19 -0700)
extra/boids/boids.factor

index d4314ade37ad5d0cf0b0ed22c9642be7e17fa847..af148cade1e07c8282dca13d1b0415ef065cd11a 100644 (file)
@@ -96,7 +96,7 @@ M: range-observer model-changed
 
 :: set-population ( n boids-gadget -- )
     boids-gadget [
-        dup length n - dup 0 >
+        dup length n - >integer dup 0 >
         [ head* ]
         [ neg random-boids append ] if
     ] change-boids drop ;