Accurate trig in python
<p>Straight to the chase I want to create a function which calculates the length of a step.</p>

<p>This is what I have:</p>

<pre><code>def humanstep(angle):
    global human
    human[1]+=math.sin(math.radians(angle))*0.06
    human[2]+=math.cos(math.radians(angle))*0.06
</code></pre>

<p>So if the angle is 90 then the x value (human[1]) should equal 0.06 and the y value equal to 0.</p>

<p>Instead  the conversion between radians and degrees is not quite perfect and these values are returned.</p>

<pre><code>[5.99999999999999, 3.6739403974420643e-16]
</code></pre>

<p>Is there anyway to fix this?</p>
