rosetta-code.image-noise: fix vocab name.

db4
John Benediktsson 2012-08-04 17:34:59 -07:00
parent cc621ee5ee
commit 5ca6fb95a7
1 changed files with 18 additions and 16 deletions

View File

@ -3,12 +3,14 @@
USING: accessors calendar images images.viewer kernel math
math.parser models models.arrow random sequences threads timers
ui ui.gadgets ui.gadgets.labels ui.gadgets.packs ;
IN: noise-ui
IN: rosetta-code.image-noise
: bits>pixels ( bits -- bits' pixels )
[ -1 shift ] [ 1 bitand ] bi 255 * ; inline
: ?generate-more-bits ( a bits -- a bits' )
over 32 mod zero? [ drop random-32 ] when ; inline
: <random-images-bytes> ( dim -- bytes )
[ 0 0 ] dip product [
?generate-more-bits