Function unitVector

Construct a unit vector u in the direction of the given angle theta (in radians).