private function getOffset($stepSize)
    {
        $stepOffset = $stepSize / $this->size * mt_rand(-$this->size, $this->size);
        $sign = $stepOffset < 0 ? -1 : 1;
        return $sign * pow(abs($stepOffset), 1 / sqrt($this->getPersistence()));
    }
private function getOffset($stepSize)
    {
        $stepOffset = $stepSize / $this->size * mt_rand(-$this->size, $this->size);
        $sign = $stepOffset < 0 ? -1 : 1;
        return $sign * pow(abs($stepOffset), 1 / sqrt($this->getPersistence()));
    }
private function getOffset ( $ stepSize ) { $ stepOffset = $ stepSize / $ this -> size * mt_rand ( - $ this -> size , $ this -> size ) ; $ sign = $ stepOffset < 0 ? - 1 : 1 ; return $ sign * pow ( abs ( $ stepOffset ) , 1 / sqrt ( $ this -> getPersistence ( ) ) ) ; }
Getting random displacement

@param float $stepSize

@return float
Getting random displacement