Skip to content

Commit

Permalink
boids: removing unnecessary with-translation.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjbq7 committed Oct 25, 2014
1 parent 1fc1c4f commit 67dc511
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions extra/boids/boids.factor
Expand Up @@ -2,11 +2,11 @@
! Copyright (C) 2011 Anton Gorenko.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays boids.simulation calendar classes kernel
literals locals math math.functions math.trig models namespaces
opengl opengl.demo-support opengl.gl sequences threads ui
ui.gadgets ui.gadgets.borders ui.gadgets.buttons
ui.gadgets.frames ui.gadgets.grids ui.gadgets.labeled
ui.gadgets.labels ui.gadgets.packs ui.gadgets.sliders ui.render ;
literals locals math math.functions math.trig models opengl
opengl.demo-support opengl.gl sequences threads ui ui.gadgets
ui.gadgets.borders ui.gadgets.buttons ui.gadgets.frames
ui.gadgets.grids ui.gadgets.labeled ui.gadgets.labels
ui.gadgets.packs ui.gadgets.sliders ui.render ;
QUALIFIED-WITH: models.range mr
IN: boids

Expand Down Expand Up @@ -49,9 +49,8 @@ M: boids-gadget ungraft*
0.0 0.0 0.0 0.5 glColor4f
[ draw-boid ] each ;

M:: boids-gadget draw-gadget* ( boids-gadget -- )
origin get
[ boids-gadget boids>> draw-boids ] with-translation ;
M: boids-gadget draw-gadget* ( boids-gadget -- )
boids>> draw-boids ;

: iterate-system ( boids-gadget -- )
dup [ boids>> ] [ behaviours>> ] [ dt>> ] tri
Expand Down

0 comments on commit 67dc511

Please sign in to comment.