]> gitweb.factorcode.org Git - factor.git/commitdiff
use inline and TYPED: in terrain so that vector math can optimize
authorJoe Groff <arcata@gmail.com>
Thu, 11 Feb 2010 18:55:50 +0000 (10:55 -0800)
committerJoe Groff <arcata@gmail.com>
Thu, 11 Feb 2010 18:55:50 +0000 (10:55 -0800)
extra/terrain/terrain.factor

index 27bd7df403550bf3c98d0519d223bf4fbcc587ac..e4838061f51644cef6a8f7233ce360dcd9312455 100644 (file)
@@ -178,9 +178,9 @@ terrain-world H{
     [
         { 0 2 3 3 } vshuffle terrain-height-at PLAYER-HEIGHT +
         -1/0. swap -1/0. -1/0. float-4-boa
-    ] keep vmax ;
+    ] keep vmax ; inline
 
-:: collide ( world player -- )
+TYPED:: collide ( world: terrain-world player: player -- )
     world terrain-segment>> :> segment
     player location>> :> location
     segment location (collide) :> location'