Q:

Increasing the speed of a ball in a brick breaker game

just starting a tuto and I'd like to constantly increase the speed of my ball, but damn I'm so bad at maths I can't even figure how to do, here's what I do at the moment :
 // I'm giving the first force (random x) when you engage the ball, in the Start method
 System.Random xForce = new System.Random();
 rigidBody.AddForce(new Vector2(xForce.Next((int)-speed, (int)speed), speed);

 // Later, in the Update code, I use this
 rigidBody.AddForce(rigidBody.velocity* speedUp);

speed and speedUp are public variables.
What is bothering me is when I add my first force, I guess that a Vector2(speed, speed) will make a faster ball than (0, speed) right ? So I'd like a way to change the direction of my force, but with the same speed resulting for the eye of the player.
Also, when I increase my speed, I do velocity* speedUp, which means (I still guess) that a Vector2(speed, speed) will increase more than a (0, speed) right ? So I'd like to increase it in the same way no matter the direction of my ball.
I don't know if I'm being clear, I read about normalized vectors on a thread but I don't understand it that's why I'm asking your help guys, thanks in advance !

A:

Okay after a lot of research what I needed was to cap the length of the velocity vector, I got it using the Vector2.ClampMagnitude function :  
System.Random xForce = new System.Random();
Vector2 direction = new Vector2(xForce.Next((int)-speed, (int)speed), speed);
Vector2 cappedDirection = (Vector2.ClampMagnitude(direction, speed));
rigidBody.AddForce(cappedDirection, ForceMode2D.Impulse);

Then in my update code, it seems that I just have to use the normalized vector. From what I read a normalized version of your vector keeps the direction with a magnitude of 1 :  
rigidBody.AddForce(rigidBody.velocity.normalized * speedUp, ForceMode2D.Impulse);

From what I tested it's working, sorry guys it seems that I wasn't clear about what I asked, I just did want the same speed no matter the direction.

