<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Comparable Extension Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
    <script src="../js/lunr.min.js" defer></script>
    <script src="../js/typeahead.jquery.js" defer></script>
    <script src="../js/jazzy.search.js" defer></script>
  </head>
  <body>
    <a name="//apple_ref/swift/Extension/Comparable" class="dashAnchor"></a>
    <a title="Comparable Extension Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="../index.html">WolmoCore 6.2.0 Docs</a> (100% documented)</p>
        <div class="header-right">
          <form role="search" action="../search.json">
            <input type="text" placeholder="Search documentation" data-typeahead>
          </form>
        </div>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="../index.html">WolmoCore Reference</a>
        <img id="carat" src="../img/carat.png" alt=""/>
        Comparable Extension Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="../Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Classes/BorderView.html">BorderView</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/ChainedAnimation.html">ChainedAnimation</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/MixedAnimation.html">MixedAnimation</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/NibView.html">NibView</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/ScrollStackViewController.html">ScrollStackViewController</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/SimpleAnimation.html">SimpleAnimation</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Global%20Variables.html">Global Variables</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Global%20Variables.html#/s:9WolmoCore20DefaultDateFormatterSo06NSDateE0Cvp">DefaultDateFormatter</a>
              </li>
              <li class="nav-group-task">
                <a href="../Global%20Variables.html#/s:9WolmoCore24DefaultWeekDateFormatterSo06NSDateF0Cvp">DefaultWeekDateFormatter</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Enums.html">Enumerations</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Enums/AnimationContent.html">AnimationContent</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/BorderPosition.html">BorderPosition</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/DeviceType.html">DeviceType</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/GradientDirection.html">GradientDirection</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/LayoutMode.html">LayoutMode</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/ViewPositioning.html">ViewPositioning</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Extensions.html">Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Extensions/Array.html">Array</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Bundle.html">Bundle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Collection.html">Collection</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Comparable.html">Comparable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Date.html">Date</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Dictionary.html">Dictionary</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions.html#/s:Si">Int</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/NSAttributedString.html">NSAttributedString</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/RawRepresentable.html">RawRepresentable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/String.html">String</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Timer.html">Timer</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UIAlertController.html">UIAlertController</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UIButton.html">UIButton</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions.html#/c:objc(cs)UICollectionReusableView">UICollectionReusableView</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UICollectionView.html">UICollectionView</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UIColor.html">UIColor</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UIFont.html">UIFont</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UIImage.html">UIImage</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UIImageView.html">UIImageView</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UILabel.html">UILabel</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UITableView.html">UITableView</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions.html#/c:objc(cs)UITableViewCell">UITableViewCell</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions.html#/c:objc(cs)UITableViewHeaderFooterView">UITableViewHeaderFooterView</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UITextField.html">UITextField</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UIView.html">UIView</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UIView/Position.html">– Position</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UIViewController.html">UIViewController</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions.html#/s:Su">UInt</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/URL.html">URL</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Functions.html">Functions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Functions.html#/s:9WolmoCore1poiySo18NSAttributedStringCAD_ADtF">+(_:_:)</a>
              </li>
              <li class="nav-group-task">
                <a href="../Functions.html#/s:9WolmoCore1doiy10Foundation3URLVAE_AA14PathAppendable_ptF">/(_:_:)</a>
              </li>
              <li class="nav-group-task">
                <a href="../Functions.html#/s:9WolmoCore1doiyS2S_AA14PathAppendable_ptF">/(_:_:)</a>
              </li>
              <li class="nav-group-task">
                <a href="../Functions.html#/s:9WolmoCore2eeoiySbAA14UIFontProvider_pSg_ADtF">==(_:_:)</a>
              </li>
              <li class="nav-group-task">
                <a href="../Functions.html#/s:9WolmoCore10SimpleName2ofSSx_tlF">SimpleName(of:)</a>
              </li>
              <li class="nav-group-task">
                <a href="../Functions.html#/s:9WolmoCore10SimpleName6ofTypeSSypXp_tF">SimpleName(ofType:)</a>
              </li>
              <li class="nav-group-task">
                <a href="../Functions.html#/s:9WolmoCore19getAssociatedObject_3keyxSgyXl_SVtlF">getAssociatedObject(_:key:)</a>
              </li>
              <li class="nav-group-task">
                <a href="../Functions.html#/s:9WolmoCore15performUIUpdate5usingyyyc_tF">performUIUpdate(using:)</a>
              </li>
              <li class="nav-group-task">
                <a href="../Functions.html#/s:9WolmoCore19setAssociatedObject_3key5value6policyyyXl_SVxSgSo22objc_AssociationPolicyVtlF">setAssociatedObject(_:key:value:policy:)</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Protocols/AlertViewPresenter.html">AlertViewPresenter</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/Animation.html">Animation</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/AnimationType.html">AnimationType</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/Collapsable.html">Collapsable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/Identifiable.html">Identifiable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/NibLoadable.html">NibLoadable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/PathAppendable.html">PathAppendable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/UIFontProvider.html">UIFontProvider</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Structs.html">Structures</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Structs/BorderViewProperties.html">BorderViewProperties</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/ConfirmationAlertViewModel.html">ConfirmationAlertViewModel</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/ErrorAlertViewModel.html">ErrorAlertViewModel</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/GradientColor.html">GradientColor</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/RawRepresentableGenerator.html">RawRepresentableGenerator</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/ViewGradient.html">ViewGradient</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Typealiases.html">Type Aliases</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:9WolmoCore6Actiona">Action</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:9WolmoCore9Transforma">Transform</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>Comparable</h1>
              <div class="declaration">
                <div class="language">
                  
                  <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">extension</span> <span class="kt">Comparable</span></code></pre>

                </div>
              </div>
            
          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:SL9WolmoCoreE5clamp3min3maxxx_xtF"></a>
                    <a name="//apple_ref/swift/Method/clamp(min:max:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:SL9WolmoCoreE5clamp3min3maxxx_xtF">clamp(min:<wbr>max:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Returns the closest value that is contained in the given interval, if the number is already in the interval it returns the same value.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">func</span> <span class="nf">clamp</span><span class="p">(</span><span class="nv">min</span><span class="p">:</span> <span class="k">Self</span><span class="p">,</span> <span class="nv">max</span><span class="p">:</span> <span class="k">Self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="k">Self</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>min</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>minimum value of the interval to use.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>max</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>maximum value of the interval to use.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>&copy; 2022 <a class="link" href="https://github.com/Wolox/wolmo-core-ios/" target="_blank" rel="external noopener">Wolox</a>. All rights reserved. (Last updated: 2022-01-07)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.1</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</html>
