diff options
Diffstat (limited to 'html')
-rw-r--r-- | html/apps/mandelbrot.mu.html | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/html/apps/mandelbrot.mu.html b/html/apps/mandelbrot.mu.html index b14d4ebc..64de0ca3 100644 --- a/html/apps/mandelbrot.mu.html +++ b/html/apps/mandelbrot.mu.html @@ -222,24 +222,23 @@ if ('onhashchange' in window) { <span id="L159" class="LineNr">159 </span> <span class="muComment"># height in the viewport goes to scene-cy + scene-width/2*height/width</span> <span id="L160" class="LineNr">160 </span> <span class="muComment"># Therefore:</span> <span id="L161" class="LineNr">161 </span> <span class="muComment"># y in the viewport goes to (scene-cy - scene-width/2*height/width) + y*scene-width/width</span> -<span id="L162" class="LineNr">162 </span> <span class="muComment"># scene-cy - scene-width/width * (height/2 + y)</span> -<span id="L163" class="LineNr">163 </span> <span class="muComment"># At most two numbers being multiplied before a divide, so no risk of overflow.</span> -<span id="L164" class="LineNr">164 </span> <span class="PreProc">var</span> result/<span class="Constant">xmm0</span>: float <span class="Special"><-</span> convert y -<span id="L165" class="LineNr">165 </span> result <span class="Special"><-</span> multiply scene-width -<span id="L166" class="LineNr">166 </span> <span class="PreProc">var</span> width-f/<span class="Constant">xmm1</span>: float <span class="Special"><-</span> convert width -<span id="L167" class="LineNr">167 </span> result <span class="Special"><-</span> divide width-f -<span id="L168" class="LineNr">168 </span> result <span class="Special"><-</span> add scene-cy -<span id="L169" class="LineNr">169 </span> <span class="PreProc">var</span> two/eax: int <span class="Special"><-</span> copy <span class="Constant">2</span> -<span id="L170" class="LineNr">170 </span> <span class="PreProc">var</span> two-f/<span class="Constant">xmm2</span>: float <span class="Special"><-</span> convert two -<span id="L171" class="LineNr">171 </span> <span class="PreProc">var</span> second-term/<span class="Constant">xmm1</span>: float <span class="Special"><-</span> copy scene-width -<span id="L172" class="LineNr">172 </span> second-term <span class="Special"><-</span> divide two-f -<span id="L173" class="LineNr">173 </span> <span class="PreProc">var</span> height-f/<span class="Constant">xmm2</span>: float <span class="Special"><-</span> convert height -<span id="L174" class="LineNr">174 </span> second-term <span class="Special"><-</span> multiply height-f -<span id="L175" class="LineNr">175 </span> <span class="PreProc">var</span> width-f/<span class="Constant">xmm2</span>: float <span class="Special"><-</span> convert width -<span id="L176" class="LineNr">176 </span> second-term <span class="Special"><-</span> divide width-f -<span id="L177" class="LineNr">177 </span> result <span class="Special"><-</span> subtract second-term -<span id="L178" class="LineNr">178 </span> <span class="PreProc">return</span> result -<span id="L179" class="LineNr">179 </span><span class="Delimiter">}</span> +<span id="L162" class="LineNr">162 </span> <span class="muComment"># At most two numbers being multiplied before a divide, so no risk of overflow.</span> +<span id="L163" class="LineNr">163 </span> <span class="PreProc">var</span> result/<span class="Constant">xmm0</span>: float <span class="Special"><-</span> convert y +<span id="L164" class="LineNr">164 </span> result <span class="Special"><-</span> multiply scene-width +<span id="L165" class="LineNr">165 </span> <span class="PreProc">var</span> width-f/<span class="Constant">xmm1</span>: float <span class="Special"><-</span> convert width +<span id="L166" class="LineNr">166 </span> result <span class="Special"><-</span> divide width-f +<span id="L167" class="LineNr">167 </span> result <span class="Special"><-</span> add scene-cy +<span id="L168" class="LineNr">168 </span> <span class="PreProc">var</span> two/eax: int <span class="Special"><-</span> copy <span class="Constant">2</span> +<span id="L169" class="LineNr">169 </span> <span class="PreProc">var</span> two-f/<span class="Constant">xmm2</span>: float <span class="Special"><-</span> convert two +<span id="L170" class="LineNr">170 </span> <span class="PreProc">var</span> second-term/<span class="Constant">xmm1</span>: float <span class="Special"><-</span> copy scene-width +<span id="L171" class="LineNr">171 </span> second-term <span class="Special"><-</span> divide two-f +<span id="L172" class="LineNr">172 </span> <span class="PreProc">var</span> height-f/<span class="Constant">xmm2</span>: float <span class="Special"><-</span> convert height +<span id="L173" class="LineNr">173 </span> second-term <span class="Special"><-</span> multiply height-f +<span id="L174" class="LineNr">174 </span> <span class="PreProc">var</span> width-f/<span class="Constant">xmm2</span>: float <span class="Special"><-</span> convert width +<span id="L175" class="LineNr">175 </span> second-term <span class="Special"><-</span> divide width-f +<span id="L176" class="LineNr">176 </span> result <span class="Special"><-</span> subtract second-term +<span id="L177" class="LineNr">177 </span> <span class="PreProc">return</span> result +<span id="L178" class="LineNr">178 </span><span class="Delimiter">}</span> </pre> </body> </html> |