I want to extract x and y based on an angle. See below.

So if the angle is 45 degrees, x would be 0.5 and y would be 0.5.
The only way I can think of solving this would be to separate the circle in 4 parts and use the Pythagorean theorem. This would require four separate formulas to account for each quadrant. I'm sure there is a better "one size fits all" formula?
EDIT:
Used this formula: x = cos(angle * (Math.PI / 180)); y = sin(angle * (Math.PI / 180));