0 Members and 1 Guest are viewing this topic.
.PUTTPUTTP*16**cos(θ)->V //P represents power, used to determine how fast the ball will moveP*16**sin(θ)->W //V is the X-velocity; W is the Y-velocityRepeat getKey(15) Pt-On(X+V->X/256, Y+W->Y/256, Pic0) //X and Y are the position components 127*W//sin(tan-1(V,W))->M //M is the magnitude of the velocity vector M-F*W//M->W //F is the friction constant. I multiply the new magnitude by each component before dividing by the current magnitude M-F*V//M->V //because W//M would give a value of 0 If X/256>90 -V->V End If Y/256>59 -W->W End DispGraphClrDrawEnd
(W²+V)²Do this instead:W²+(V²)
Also, make sure to add the parentheses in the square root bracket, because axe will compute it like this:Code: [Select](W²+V)²Do this instead:W²+(V²)
Also, make sure you used "²" which is the square operator, and not ^2 which is a modulo operator