Determine delta value.

Delta value will be between 2 and a multiple 128 which is large enough to contain all models being moved.

@return float|int
516654
private function determineDelta()
    {
        $delta = (
            ($this->marker->getProperty($this->getSortingProperty()) - $this->position) / $this->results->length()
        );

        // If delta too narrow, we need to make room.
        // Prevent delta to exceed, also. Use minimum delta which is calculated as multiple of 128.
        if (($delta < 2) || ($delta > 128)) {
            return (\ceil($this->results->length() / 128) * 128);
        }

        return $delta;
    }
704361
public function setPrecomputeDelta($delta)
    {
        if (!is_int($delta) || $delta < 1 || $delta > 100) {
            throw new Exception('Invalid delta specified. An integer between 1 and 100 is required.');
        }

        $this->precomputeDelta = $delta;
    }
504106
public function maxNorm(): float
    {
        return array_reduce($this->toArray(), function (float $carry, float $value) {
            $value = abs($value);

            return $carry > $value ? $carry : $value;
        }, -INF);
    }
1059148
public function getVolumeUtilisation(): float
    {
        $itemVolume = 0;
        $boxVolume = 0;

        /** @var PackedBox $box */
        foreach ($this as $box) {
            $boxVolume += $box->getInnerVolume();

            /** @var PackedItem $item */
            foreach ($box->getItems() as $item) {
                $itemVolume += ($item->getItem()->getWidth() * $item->getItem()->getLength() * $item->getItem()->getDepth());
            }
        }

        return round($itemVolume / $boxVolume * 100, 1);
    }
1208806
private function getStepValue()
    {
        $value = $this->_scopeConfig->getValue(PriceDataProvider::XML_PATH_RANGE_STEP, ScopeInterface::SCOPE_STORE);

        return (int) $value;
    }
829318
public function length2() : float {
        $value = 0;
        $count = count($this->elements);
        for ($i=0;$i<$count;$i++) {
            $value += ($this[$i] * $this[$i]);
        }
        return $value;
    }
972240
protected function getMinValue()
    {
        $minValue = $this->getFilter()->getMinValue();

        if ($this->isManualCalculation() && ($this->getStepValue() > 0)) {
            $stepValue = $this->getStepValue();
            $minValue  = floor($minValue / $stepValue) * $stepValue;
        }

        return $minValue;
    }
785472
public function castFloat()
    {
        $castFunction = function ($value) {
            return (float) $value;
        };

        if (is_numeric($this->value)) {
            return $castFunction($this->value);
        }

        return $this->handleMismatch($castFunction, 'double');
    }
62876
public function getMaxAge()
    {
        if (isset($this->headers['cache-control']) &&
            ($value = $this->getInlineValue($this->headers['cache-control'], 'max-age', ',')) !== false
        ) {
            return intval($value);
        }
        return 0;
    }
615383
public function balance() : int
    {
        return ($this->right ? $this->right->height() : 0)
            - ($this->left ? $this->left->height() : 0);
    }
552892
public function getDepth() : ?int 
    {
        if ( ! $this->hasDepth()) {
            $this->setDepth($this->getDefaultDepth());
        }
        return $this->depth;
    }
223013
public function GetDiscountValue()
    {
        $dValue = 0;
        $iTmpPointer = $this->getItemPointer();
        $this->GoToStart();
        while ($oDiscount = $this->Next()) {
            $dValue += $oDiscount->GetValue();
        }

        $this->setItemPointer($iTmpPointer);

        return $dValue;
    }
536195
public function getNumberOfItemSlots(): int
    {
        if ($this->numberOfItemSlots === self::VALUE_UNLIMITED_SLOTS_DATABASE) {
            $result = self::VALUE_UNLIMITED_SLOTS;
        } else {
            $result = $this->numberOfItemSlots;
        }
        return $result;
    }
112834
public function getRawValue()
    {
        $value = $this->transformer->reverseTransform($this->value);

        if ($this->getOption('flush', false)) {
            return '';
        }

        return $value;
    }
1325637
public function calculateToPrice()
    {
        if (count($this->_aList) == 0) {
            return;
        }

        $dNetoTotal = 0;
        $dVatTotal = 0;

        foreach ($this->_aList as $oPrice) {
            $dNetoTotal += $oPrice->getNettoPrice();
            $dVatTotal += $oPrice->getVatValue();
        }

        $oPrice = oxNew(\OxidEsales\Eshop\Core\Price::class);

        if ($dNetoTotal) {
            $dVat = $dVatTotal * 100 / $dNetoTotal;

            $oPrice->setNettoPriceMode();
            $oPrice->setPrice($dNetoTotal);
            $oPrice->setVat($dVat);
        }

        return $oPrice;
    }
159614
public function GetTotalValue()
    {
        $dVal = 0;
        $iPointer = $this->getItemPointer();
        $this->GoToStart();
        while ($oItem = &$this->Next()) {
            $dVal += $oItem->getTotalValue();
        }
        $this->setItemPointer($iPointer);

        return $dVal;
    }
486921
public function deltaT()
    {
        // Historic ΔT
        if ($this->jd < 2441714.5) {
            return $this->deltaT_historic();
        }

        // Predictive ΔT
        if ($this->jd > $this->deltaT_lastJD()) {
            return $this->deltaT_predict();
        }

        // Base ΔT data file
        return $this->deltaT_base();
    }