noise: update for iota
parent
df4fb4a3ee
commit
a93831a36e
|
@ -0,0 +1,4 @@
|
|||
IN: noise.tests
|
||||
USING: noise tools.test sequences math ;
|
||||
|
||||
[ t ] [ { 100 100 } perlin-noise-map-coords [ [ 100 <= ] all? ] all? ] unit-test
|
|
@ -120,7 +120,7 @@ TYPED:: perlin-noise ( table: byte-array point: float-4 -- value: float )
|
|||
faded trilerp ;
|
||||
|
||||
MEMO: perlin-noise-map-coords ( dim -- coords )
|
||||
first2 [| x y | x [ y 0.0 0.0 float-4-boa ] float-4-array{ } map-as ] with map concat ;
|
||||
first2 iota [| x y | x iota [ y 0.0 0.0 float-4-boa ] float-4-array{ } map-as ] with map concat ;
|
||||
|
||||
TYPED:: perlin-noise-map ( table: byte-array transform: matrix4 coords: float-4-array -- map: float-array )
|
||||
coords [| coord | table transform coord m4.v perlin-noise ] data-map( float-4 -- c:float )
|
||||
|
|
Loading…
Reference in New Issue