// <!-- reflection at bottom and top boundary -->
function checkY(y,Num){
height=parseIntohnepx(StyleOfTheSquare[Num].height);
edge=doc_height-height
if (y > edge) {
y=doc_height-height;
yspeed[Num]*=-Yreflectionrate;
// y=0 + y - doc_height;
}
if (y<0) {
y=0;
yspeed[Num]*=-Yreflectionrate;
// y=doc_height+y;
}
return y;
}
|
|
How?
|