Vector Math Question

Math is not my strong suit, so please excuse what I think is a very basic question.

How do I convert an angle to a vector? I’ve looked and can’t find any function that does this, although I’m not sure what to even call this operation. I need to take an angle, in degrees, and get the corresponding vector.

See the attached image for a better explanation. I know the vectors that correspond to up (0, 1), down (0, -1), left (-1, 0), and right (1, 0). But I need to calculate the vector for any arbitrary angle. Is there a function for this, or is this a simple interpolation, or a calculation?

453155--15831--$Vectors.jpg

Vector.X = Cos(angle)
Vector.Y = Sin(angle)

(tweak for degrees/radians as needed)

That should give you the components of a unit vector (magnitude = 1)

EDIT: assuming that the angle starts at 0 along the positive X axis, then increases counter-clockwise (45 degrees would be up-right, 90 degrees would be straight up, 135 degrees is up-left)