View Full Version : Thanks , Chennes and Peverbian!

09-13-2001, 07:41 PM
(I forgot my pw, so have to post a new)
Thank you so much for your reply, Chennes and Peverbian!

Peverbian, I tried your suggestion, Yes it works!!

And also I find my problem comes from the abs function

if I change it to
if(x>1.5 &#0124; &#0124; x<-1.5 &#0124; &#0124; y>1.5 &#0124; &#0124; y<-1.5)...

instead of
if(abs(x)>1.5 &#0124; &#0124; abs(y)>1.5)

It also works, the ball won't go beyond the rectangle border.

I think abs return a integer instead of a float--which I thought it should be.

Anyway thank you so much

Michael Steinberg
09-14-2001, 01:27 AM
that's why there's a function called fabs()...

09-14-2001, 08:51 AM
fabs can't work either

Originally posted by Michael Steinberg:
that's why there's a function called fabs()...