Nov-21-2018, 06:10 PM
So I have a way to turn an angle into x and y values:
and how can I make it right?
angle = math.radians(0) y = math.cos(angle) x = math.sin(angle) print(x,y)and it prints:
Output:0.0 1.0
but then, I change they 0 to 90:angle = math.radians(90) y = math.cos(angle) x = math.sin(angle) print(x,y)and would expect to have 1.0 0.0 as the output, but got this:
Output:1.0 6.123233995736766e-17
which is a super miniscule number, but why isn't it 1.0 0.0?and how can I make it right?