Hi,

This code is good, I just a few stylistic suggestions:

On 2-Jun-07, at 2:11 AM, Jeff Ervin wrote:

> : update-rotation ( angle -- angle )
>     2.0 + dup 360.0 > [ 360.0 - ] when ;

You can use mod here:

: update-rotation ( angle -- newangle )
     2.0 + 360.0 mod ;

> C: square-gadget ( -- gadget )
>     [ 0.0 swap set-square-gadget-rotation ] keep
>     [ delegate>gadget ] keep ;

Simpler stack shuffling:

C: square-gadget ( -- gadget )
     0.0 over set-square-gadget-rotation
     dup delegate>gadget
     dup black solid-interior ;

> M: square-gadget graft* ( gadget -- )
>     black solid-interior ;

Because this word just sets a slot in the gadget tuple, you can  
perform this task in the constructor and avoid defining a graft* method.

Have fun,

Slava


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to