math question, remapping angle value

Hi there !

I have an angle float value in degrees varying from 0 to 360 stored in the variable named angle.

I want to remap that angle value to values ranging from -1 to 1 that would be stored in float variables named verticalPower and horizontalPower. I made an image to show how I would like this to be remapped, for example when angle==90 verticalPower=0 and horizontalPower=1.

The reason why I am stuck is because the angle value resets to 0 after reaching 360.
I can not use simple remapping like this:
low2 + (value - low1) * (high2 - low2) / (high1 - low1)

Any idea how I could acheive this ??

Thank you

Um - have you tried taking the Sin of that angle for your blue and the Cos for red?

This is really a nice suggestion and still works but not perfectly because sin45=0.7 and not 0.5. Similar results happen with cos. Thank you very much !

public static Vector3 LocalTilt(Vector3 euler)
Vector3 localTilt =;
localTilt.x = Mathf.Sin(euler.xMathf.Deg2Rad);
localTilt.y = Mathf.Sin(euler.y
localTilt.z = Mathf.Sin(euler.z*Mathf.Deg2Rad);
return localTilt;