You could compute the vector (the actual arrow, direction vector) and then normalize it (meaning chaning it's size to 1, you can easily check how to do that by checking the internet.
Then you can multiply this vector by a constant to get a fixed length (and then return from your vector to your line with math magic)