Easiest way quite frankly is not worry about speed and angle.
Use Xspeed and Yspeed
When the ball hits the bat may yspeed = -yspeed, and adjust the xspeed depending on where on the bat the ball hits.
Use Xspeed and Yspeed
When the ball hits the bat may yspeed = -yspeed, and adjust the xspeed depending on where on the bat the ball hits.
Graphics 400,300,0,2 x#=200 y#=150 xd#=Rnd(-2,2) yd#=Rnd(-2,2) SetBuffer BackBuffer() Repeat ; draw screen Cls Text x,y,"O",True,True ; update location x=x+xd y=y+yd ; bounce of sides If x<0 Then xd=-xd If x>400 Then xd=-xd If y<0 Then yd=-yd If y>300 Then yd=-yd Flip Until KeyHit(1)