# CSJ2K.j2k.util.MathUtil

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="CSJ2K_j2k_util_MathUtil" data-uid="CSJ2K.j2k.util.MathUtil" class="text-break">MathUtil Class
</h1>
  <div class="markdown level0 summary"><p>This class contains a collection of utility methods fro mathematical
operations. All methods are static.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">MathUtil</span></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="CSJ2K.j2k.util.html">CSJ2K.j2k.util</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.ReportViewer.4.6.2.dll</h6>
  <h5 id="CSJ2K_j2k_util_MathUtil_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class MathUtil</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class MathUtil</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_util_MathUtil__ctor" data-uid="CSJ2K.j2k.util.MathUtil.#ctor">
          <a class="xref" href="CSJ2K.j2k.util.MathUtil.-ctor.html#CSJ2K_j2k_util_MathUtil__ctor">MathUtil()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_util_MathUtil_gcd_System_Int32_System_Int32_" data-uid="CSJ2K.j2k.util.MathUtil.gcd(System.Int32,System.Int32)">
          <a class="xref" href="CSJ2K.j2k.util.MathUtil.gcd.html#CSJ2K_j2k_util_MathUtil_gcd_System_Int32_System_Int32_">gcd(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Method that calculates the Greatest Common Divisor (GCD) of two
positive integer numbers.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_util_MathUtil_gcd_System_Int32___" data-uid="CSJ2K.j2k.util.MathUtil.gcd(System.Int32[])">
          <a class="xref" href="CSJ2K.j2k.util.MathUtil.gcd.html#CSJ2K_j2k_util_MathUtil_gcd_System_Int32___">gcd(int[])</a>
        </td>
        <td class="markdown level1 summary"><p>Method that calculates the Greatest Common Divisor (GCD) of several
positive integer numbers.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_util_MathUtil_lcm_System_Int32_System_Int32_" data-uid="CSJ2K.j2k.util.MathUtil.lcm(System.Int32,System.Int32)">
          <a class="xref" href="CSJ2K.j2k.util.MathUtil.lcm.html#CSJ2K_j2k_util_MathUtil_lcm_System_Int32_System_Int32_">lcm(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Method that calculates the Least Common Multiple (LCM) of two strictly
positive integer numbers.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_util_MathUtil_lcm_System_Int32___" data-uid="CSJ2K.j2k.util.MathUtil.lcm(System.Int32[])">
          <a class="xref" href="CSJ2K.j2k.util.MathUtil.lcm.html#CSJ2K_j2k_util_MathUtil_lcm_System_Int32___">lcm(int[])</a>
        </td>
        <td class="markdown level1 summary"><p>Method that calculates the Least Common Multiple (LCM) of several
positive integer numbers.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_util_MathUtil_log2_System_Int32_" data-uid="CSJ2K.j2k.util.MathUtil.log2(System.Int32)">
          <a class="xref" href="CSJ2K.j2k.util.MathUtil.log2.html#CSJ2K_j2k_util_MathUtil_log2_System_Int32_">log2(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Method that calculates the floor of the log, base 2, of 'x'. The
calculation is performed in integer arithmetic, therefore, it is exact.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
