On Sun, Jan 5, 2014 at 1:06 PM, tim Rowledge <tim@rowledge.org> wrote:


On 05-01-2014, at 1:01 PM, Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com> wrote:

> ? so the goal was not to limit dx2 and dy2 in interval [-2.0,2.0] ?

Uuuh… maybe. It really doesn’t matter much since the prim isn’t used, but I suppose it ought to be correct

But the correct code would indeed be

(a) (dx2 < -2) ifTrue: [dx2 := -2].
(dx2 >  2) ifTrue: [dx2 := 2].
(dy2 < -2) ifTrue: [dy2 := -2].
(dy2 >  2) ifTrue: [dy2 := 2].
 
*not*
(b) (dx2<2) ifTrue: [dx2 := -2].
(dx2>2) ifTrue: [dx2 := 2].
(dy2<2) ifTrue: [dy2 := -2].
(dy2>2) ifTrue: [dy2 := 2].

i.e. the problem is just that dx2<-2 is ambiguous, it could mean dx2 <- 2 (new binary selector rules) or dx2 < -2 (the intended).  I juts committed your fix but I think it's wrong.  It should be (a).  I'm going to change it.  Forgive me :-)


tim
--
tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: IAM: Increase Amperage Above Maximum





--
best,
Eliot