requestAnimationFrame not working with decimal numbers below 1
<p><strong>requestAnimationFrame</strong> doesnt work with decimals for some reason. Usually when animating in canvas I can work with decimals but in the case of dom elements I fail. As you can see below, I am animating the left position of a single div which works for n > 1 but not n &lt; 1 (0.1, 0.2 etc).</p>

<p>Why is this the case? </p>

<p><a href="https://jsfiddle.net/m1qzqvu8" rel="nofollow">https://jsfiddle.net/m1qzqvu8</a></p>

<pre><code>var elem = document.getElementsByTagName('div')[0]

function fn(){
var x = parseInt(elem.style.left);
x += 0.4
elem.style.left = x + "px"
    requestAnimationFrame(fn)
}

fn()
</code></pre>

<p>The reason im trying to make this work is speed. I need to make things slower or faster.</p>