Check if specified number is with in specified range

@param int $num
@param int $from
@param int $to
@return bool
190426
public static function Range(int $num, int $from, int $to): bool
    {
        return ($num >= $from && $num <= $to) ? true : false;
    }
403450
public function removeRange($from, $to)
    {
        foreach ($this->ranges as $key => $range) {
            if (array_diff_assoc(array_filter(['from' => $from, 'to' => $to]), $range) === []) {
                unset($this->ranges[$key]);

                return true;
            }
        }

        return false;
    }
996508
public function from($from = null) {
        if ($from === null) {
            return $this->from;
        }

        $this->from = (int) $from;

        return $this;
    }
587636
protected function verifyDates($from, $to, $format = 'YmdHs')
    {
        if (!DateTime::createFromFormat($format, $from)) {
            $message = 'The $from date is improperly formatted. Please use "YmdHs".';
            throw new \InvalidArgumentException($message);
        }
        if (!DateTime::createFromFormat($format, $to)) {
            $message = 'The $to date is improperly formatted. Please use "YmdHs".';
            throw new \InvalidArgumentException($message);
        }
        if (new DateTime($from) > new DateTime($to)) {
            $message = 'The $from date cannot be a later date than the $to date.';
            throw new \InvalidArgumentException($message);
        }
    }
161896
public function convert($value, $fromUnit, $toUnit) {
		$fromUnit = strtoupper($fromUnit);
		$toUnit = strtoupper($toUnit);

		if (!isset($this->_units[$fromUnit]) || !isset($this->_units[$toUnit])) {
			throw new CalculatorException('Invalid Unit');
		}

		if ($fromUnit === static::UNIT_MILES) {
			$value *= $this->_units[$toUnit];
		} elseif ($toUnit === static::UNIT_MILES) {
			$value /= $this->_units[$fromUnit];
		} else {
			$value /= $this->_units[$fromUnit];
			$value *= $this->_units[$toUnit];
		}
		return $value;
	}
847128
protected function checkTable(Table $fromTable, Table $toTable)
    {
        $tableName = $fromTable->getName();
        $diff = (new Comparator())->diffTable($fromTable, $toTable);
        if ($diff !== false) {
            $this->removeIgnoredChanges($diff);
            $this->diffs[$tableName] = $diff;
        }
    }
1336013
protected static void checkRangeFromTo(int from, int to, int theSize) {
	if (to==from-1) return;
	if (from<0 || from>to || to>=theSize)
		throw new IndexOutOfBoundsException("from: "+from+", to: "+to+", size="+theSize);
}
1247837
public static Interval oddsFromTo(int from, int to)
    {
        if (from % 2 == 0)
        {
            if (from < to)
            {
                from++;
            }
            else
            {
                from--;
            }
        }
        if (to % 2 == 0)
        {
            if (to > from)
            {
                to--;
            }
            else
            {
                to++;
            }
        }
        return Interval.fromToBy(from, to, to > from ? 2 : -2);
    }
837409
public function move($from, $to)
    {
        event(new Events\FileMoving($from, $to));
        $moved = $this->disk()->move($from, $to);
        event(new Events\FileMoved($from, $to, $moved));

        return $moved;
    }
270678
public function seek($num)
    {
        if ($num >= 0 && $num <= $this->count() - 1) {
            if (!$this->resource->data_seek($num)) {
                return false;
            }

            $this->cursor_position = $num;

            return true;
        }

        return false;
    }
181769
public function isBetweenExclusive(ZonedDateTime $from, ZonedDateTime $to) : bool
    {
        return $this->isAfter($from) && $this->isBefore($to);
    }
1267243
public function getLikeCountByDate($from, $to = null): int
    {
        return Like::countByDate($this, $from, $to);
    }
22035
public static function numberToFromNativeLanguage($number, $options, $from = false) {
		if (!empty(self::$options['locale_override_class'])) {
			$locale_override_class = self::$options['locale_override_class'];
			if (!$from) {
				$number = $locale_override_class::amount($number . '', $options);
			} else {
				$number = $locale_override_class::readFloatval($number . '', $options);
			}
		}
		return $number;
	}
297928
public function relPath($from,$to) {
		$expFrom = explode('/',$from);
		$expTo = explode('/',$to);
		$max=max(count($expFrom),count($expTo));
		$rel = [];
		$base=TRUE;
		for ($i=0;$i<$max;$i++) {
			if ($base && isset($expTo[$i]) && isset($expFrom[$i])
				&& $expTo[$i] === $expFrom[$i])
				continue;
			else
				$base=FALSE;
			if (!empty($expFrom[$i]))
				array_unshift($rel,'..');
			if (!empty($expTo[$i]))
				array_push($rel,$expTo[$i]);
		}
		return implode('/',$rel);
	}
1142903
public static function computeDiff(Column $fromColumn, Column $toColumn)
    {
        if ($changedProperties = self::compareColumns($fromColumn, $toColumn)) {
            if ($fromColumn->hasPlatform() || $toColumn->hasPlatform()) {
                $platform = $fromColumn->hasPlatform() ? $fromColumn->getPlatform() : $toColumn->getPlatform();
                if ($platform->getColumnDDL($fromColumn) == $platform->getColumnDDl($toColumn)) {
                    return false;
                }
            }
            $columnDiff = new PropelColumnDiff();
            $columnDiff->setFromColumn($fromColumn);
            $columnDiff->setToColumn($toColumn);
            $columnDiff->setChangedProperties($changedProperties);

            return $columnDiff;
        } else {
            return false;
        }
    }
842687
public static function createRanges(
        int $from,
        int $to,
        int $incremental
    ): array {
        $ranges = [];
        while ($from < $to) {
            $nextTo = $from + $incremental;
            $ranges[] = $from.self::SEPARATOR.$nextTo;
            $from = $nextTo;
        }

        return $ranges;
    }
589698
public function smartConvert($amount, $from, $to)
    {
        // Smart Convert Logic
        Log::info('Running Smart Currency Conversion');

        if ($this->_currencyLayerApiKey != NULL)
        {
            $conv = self::currencyLayerConvert($amount, $from, $to);

            if(!$conv)
            {
                if ($this->_exchangeRateApiKey != NULL)
                {
                    return self::exchangeRateConvert($amount, $from, $to);
                }
                return false;
            }

            return $conv;
        }
        elseif ($this->_exchangeRateApiKey != NULL)
        {
            return self::exchangeRateConvert($amount, $from, $to);
        }

        return false;
    }