, , . , . , , , , .:)
- (: = 1), ( 90 ) . , , . , ( , 0,0):
top: (0,1)
bottom: (0,-1)
left: (1,0)
right: (-1,0)
, "" , . :
V2 = V1 - 2*N*(N.dot(V1))
V1 - ( ), N - , , V2 - ( ). "N.dot(V1)" " " N V1, (N.xV1.x + N.yV1.y).
, (P - , Q - ):

psuedocode:
float nx = 0, ny = 1;
float ix = ball.vx, iy = ball.vy;
float dotprod = (nx*ix + ny*iy);
ball.vx = ix - 2*nx*(dotprod);
ball.vy = iy - 2*ny*(dotprod);
, - .:) , , , , ...