Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]

   1  <?php
   2  /**
   3   * SCSSPHP
   4   *
   5   * @copyright 2015-2019 Leaf Corcoran
   6   *
   7   * @license http://opensource.org/licenses/MIT MIT
   8   *
   9   * @link http://scssphp.github.io/scssphp
  10   */
  11  
  12  namespace ScssPhp\ScssPhp\Base;
  13  
  14  /**
  15   * Range
  16   *
  17   * @author Anthon Pang <anthon.pang@gmail.com>
  18   */
  19  class Range
  20  {
  21      public $first;
  22      public $last;
  23  
  24      /**
  25       * Initialize range
  26       *
  27       * @param integer|float $first
  28       * @param integer|float $last
  29       */
  30      public function __construct($first, $last)
  31      {
  32          $this->first = $first;
  33          $this->last = $last;
  34      }
  35  
  36      /**
  37       * Test for inclusion in range
  38       *
  39       * @param integer|float $value
  40       *
  41       * @return boolean
  42       */
  43      public function includes($value)
  44      {
  45          return $value >= $this->first && $value <= $this->last;
  46      }
  47  }