To rotate the vector v = (x, y)angle alphaclockwise relative to the origin, you can multiply by the matrix:
[ cos alpha sin alpha ]
[ -sin alpha cos alpha ]
Thus, a rotated vector with the same magnitude will be
(x cos alpha + y sin alpha, -x sin alpha + y cos alpha).
To change a value from | v | to | w |, multiply both coordinates by | w | / | v |.