Javascript: How to determine a SVG path draw direction?
<p>I'm trying to determine a SVG path draw orientation. I'm working on something like this</p>

<pre><code>var length = path.getTotalLength();
var horizontal = path.getPointAtLength(length/4).x - path.getPointAtLength(0).x;
var vertical = path.getPointAtLength(length/4).y - path.getPointAtLength(0).y;
</code></pre>

<p>Then do some comparisons with these values <code>horizontal &gt; 0</code> and <code>vertical &gt; 0</code>, but this above idea isn't, in my mind, very successful. </p>

<p>My question is: is there anything I can use to determine the draw direction or perhaps some built in SVG methods/options?</p>

<p>Thank you</p>