Algorithm tweak.
authorCameron McCormack <cam@mcc.id.au>
Tue, 22 May 2012 09:24:37 +1000
changeset 118 fd5a9abb5ce6
parent 117 5fa40b3b4066
child 119 0e5801f32872
Algorithm tweak.
master/painting.html
--- a/master/painting.html	Mon May 21 19:04:52 2012 +1000
+++ b/master/painting.html	Tue May 22 09:24:37 2012 +1000
@@ -1052,13 +1052,12 @@
   <li>Let <var>dashlength</var> be min(sum(<var>dashes<sub>i</sub></var>, 0 ≤ <var>i</var> ≤ <var>dashindex</var>) − <var>offset</var>, <var>length</var>).</li>
   <li>If <var>dashindex</var> mod 2 = 0, then append to <var>positions</var> the pair &lt;0, <var>dashlength</var>&gt;.</li>
   <li>Let <var>position</var> be <var>dashlength</var>.</li>
-  <li>Set <var>dashindex</var> to (<var>dashindex</var> + 1) mod <var>dashcount</var>.</li>
 
   <li>While <var>position</var> &lt; <var>length</var>:
     <ol>
+      <li>Set <var>dashindex</var> to (<var>dashindex</var> + 1) mod <var>dashcount</var>.</li>
       <li>Let <var>dashlength</var> be min(<var>dashes</var><sub><var>dashindex</var></sub>, <var>length</var> − <var>position</var>).</li>
       <li>If <var>dashindex</var> mod 2 = 0, then append to <var>positions</var> the pair &lt;<var>position</var>, <var>position</var> + <var>dashlength</var>&gt;.</li>
-      <li>Set <var>dashindex</var> to (<var>dashindex</var> + 1) mod <var>dashcount</var>.</li>
       <li>Set <var>position</var> to <var>position</var> + <var>dashlength</var>.</li>
     </ol>
   </li>