This question is relating to a 2d game I am programming for.
There are 2 discs at positions (coordinates x & y): Disc1 is moving (at xspeed & yspeed) Disc2 is stationary
Knowing all the parameters, I need a formula that can calculate the perpendicular speed (in relation to the positions of the 2 discs).
I also need to know the x and y components of the perpendicular speed.
Refer to the diagram below:

It's just the projection of the velocity onto the perpendicular direction. You can find the angle between x-axis and the line connecting $(x_1,y_1),(x_2,y_2)$ and then just project xspeed and yspeed onto that direction, and sum them up.