It's simple when you're just rotating a 2D vector.
In your case there isn't a need to rotate the Z component.
%ox is the original X component, %oy is the original Y component and %theta is the rotation in radians.
%nx is the new X component and %ny is the new Y component.
%cs = mCos( %theta );
%sn = mSin( %theta );
%nx = %ox * %cs - %oy * %sn;
%ny = %ox * %sn + %oy * %cs;
Example of practical usage:
%vel = %obj.getVelocity();
%ox = getWord( %vel, 0 );
%oy = getWord( %vel, 1 );
// ...
%obj.setVelocity( %nx SPC %ny SPC getWord( %vel, 2 ) );