Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
royaltm committed Jan 20, 2024
1 parent fda4690 commit 530f758
Show file tree
Hide file tree
Showing 27 changed files with 3,388 additions and 378 deletions.
26 changes: 26 additions & 0 deletions CHANGELOG_md.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ <h3>Table of Contents</h3>
<li><a href="#label-v1.1.1.pre-2">v1.1.1.pre-2</a>
<li><a href="#label-Z80-3A">Z80:</a>
<li><a href="#label-ZXLib-3A">ZXLib:</a>
<li><a href="#label-Z80Lib3D-3A">Z80Lib3D:</a>
<li><a href="#label-v1.1.0">v1.1.0</a>
<li><a href="#label-Z80-3A">Z80:</a>
<li><a href="#label-ZXLib-3A">ZXLib:</a>
Expand Down Expand Up @@ -99,11 +100,21 @@ <h2 id="label-Z80-3A">Z80:<span><a href="#label-Z80-3A">&para;</a> <a href="#top
<ul><li>
<p>New macro <a href="Z80/MathInt/Macros.html#method-i-mul8_signed"><code>Z80::MathInt::Macros#mul8_signed</code></a>.</p>
</li><li>
<p>New macro <a href="Z80/MathInt/Macros.html#method-i-mul_signed9"><code>Z80::MathInt::Macros#mul_signed9</code></a>.</p>
</li><li>
<p>New macro <a href="Z80/MathInt/Macros.html#method-i-mul_signed9_24"><code>Z80::MathInt::Macros#mul_signed9_24</code></a>.</p>
</li><li>
<p>New macro <a href="Z80/MathInt/Macros.html#method-i-sll8_16"><code>Z80::MathInt::Macros#sll8_16</code></a>.</p>
</li><li>
<p>New macro <a href="Z80/MathInt/Macros.html#method-i-divmod16_8"><code>Z80::MathInt::Macros#divmod16_8</code></a>.</p>
</li><li>
<p>Saved 1 cycle on macro <a href="Z80/MathInt/Macros.html#method-i-mul"><code>Z80::MathInt::Macros#mul</code></a>.</p>
</li><li>
<p>New macro <a href="Z80/MathInt/Macros.html#method-i-sign_extend"><code>Z80::MathInt::Macros#sign_extend</code></a>.</p>
</li><li>
<p>New options :k_int24 and :optimize for <a href="Z80/MathInt/Macros.html#method-i-mul8_24"><code>Z80::MathInt::Macros#mul8_24</code></a>, saved 2 cycles.</p>
</li><li>
<p><a href="Z80/Utils/SinCos/Macros.html#method-i-sincos_from_angle"><code>Z80::Utils::SinCos::Macros#sincos_from_angle</code></a> enhanced arguments to support providing registers.</p>
</li></ul>

<h2 id="label-ZXLib-3A">ZXLib:<span><a href="#label-ZXLib-3A">&para;</a> <a href="#top">&uarr;</a></span></h2>
Expand All @@ -113,6 +124,21 @@ <h2 id="label-ZXLib-3A">ZXLib:<span><a href="#label-ZXLib-3A">&para;</a> <a href
<p>Internal labels <code>preshift_p</code>, <code>pmask_in_e</code>, <code>px_bsh_in_ae</code> added to <a href="ZXLib/Gfx/Draw/Macros.html"><code>ZXLib::Gfx::Draw::Macros</code></a> for convenience and alternative entry points.</p>
</li><li>
<p>New routines in <a href="ZXLib/Gfx/Draw/Macros.html"><code>ZXLib::Gfx::Draw::Macros</code></a> for updating draw line functions in place.</p>
</li><li>
<p>Changed arguments of <a href="ZXLib/Sys/Macros.html#method-i-read_integer32_value"><code>ZXLib::Sys::Macros#read_integer32_value</code></a> to 4 8-bit registers instead of 2 16-bit registers, maintaining backward compatibility.</p>
</li></ul>

<h2 id="label-Z80Lib3D-3A">Z80Lib3D:<span><a href="#label-Z80Lib3D-3A">&para;</a> <a href="#top">&uarr;</a></span></h2>
<ul><li>
<p>New library created.</p>
</li><li>
<p><a href="Z80Lib3D/Primitives.html"><code>Z80Lib3D::Primitives</code></a> struct collection added.</p>
</li><li>
<p><a href="Z80Lib3D/Quaternion.html"><code>Z80Lib3D::Quaternion</code></a> module with helper functions added.</p>
</li><li>
<p><a href="Z80Lib3D/Matrix3D.html"><code>Z80Lib3D::Matrix3D</code></a> class with macros for applying matrices added.</p>
</li><li>
<p>Float::to_fixed16_8 method defined in fixed_float.rb file.</p>
</li></ul>

<h1 id="label-v1.1.0">v1.1.0<span><a href="#label-v1.1.0">&para;</a> <a href="#top">&uarr;</a></span></h1>
Expand Down
37 changes: 37 additions & 0 deletions Float.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ <h3>Methods</h3>

<ul class="link-list" role="directory">

<li ><a href="#method-i-to_fixed16_8">#to_fixed16_8</a>

<li ><a href="#method-i-to_z80bin">#to_z80bin</a>

</ul>
Expand Down Expand Up @@ -109,6 +111,41 @@ <h3>Public Instance Methods</h3>
</header>


<div id="method-i-to_fixed16_8" class="method-detail ">

<div class="method-heading">
<span class="method-name">to_fixed16_8</span><span
class="method-args">()</span>

<span class="method-click-advice">click to toggle source</span>

</div>


<div class="method-description">

<p>Converts a float to a 16-bit fixed point twos complement number formatted: iiiiiiiiffffffff where i represents the absolute integer part bits and f represents the fractional part bits.</p>




<div class="method-source-code" id="to_fixed16_8-source">
<pre><span class="ruby-comment"># File lib/z80lib3d/fixed_float.rb, line 5</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_fixed16_8</span>
<span class="ruby-identifier">n</span> = (<span class="ruby-keyword">self</span> <span class="ruby-operator">*</span> <span class="ruby-value">256.0</span>).<span class="ruby-identifier">round</span>
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">n</span> <span class="ruby-operator">&gt;=</span> <span class="ruby-value">32768</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">n</span> <span class="ruby-operator">&lt;=</span> <span class="ruby-value">-32768</span>
<span class="ruby-identifier">n</span> <span class="ruby-operator">&amp;</span> <span class="ruby-value">0xffff</span>
<span class="ruby-keyword">end</span></pre>
</div>

</div>




</div>


<div id="method-i-to_z80bin" class="method-detail ">

<div class="method-heading">
Expand Down
Loading

0 comments on commit 530f758

Please sign in to comment.