How to use dot product return value

So, is there anyway to make the dot product change linearly? What I mean by this is when the angle is 45 degrees, I want it to be 0.5 instead of 0.7071 as you can see in this image:

alt text

Instead I want 45 degrees to be 0.5, 60 degrees to be 0.33 and 30 degrees to be 0.66. Same would apply for the other side(135 should be -0.5)

Thank you

Sure, what the dot product of two normalized vectors returns is the cosine between those two angles. What you want is the angle, so all you need to do is to take the arccos of that value to get the angle in radians. To get a value between 0 and 1 you just need to divide by PI. So 0 is 0° and 1 is 180° 0.5 is 90°

    float v = Mathf.Acos(dot) / Mathf.PI;