Destiny\Grimoire\Rank::gPercentDisplay PHP Method

gPercentDisplay() protected method

protected gPercentDisplay ( )
    protected function gPercentDisplay()
    {
        $value = $this->statistic->value;
        if (!$this->completed && !$this->inProgress) {
            return 0;
        }
        if ($value > $this->threshold) {
            return 100;
        }
        $value = $this->statistic->value - $this->offset;
        $max = $this->threshold - $this->offset;
        $percent = $value / $max * 100;
        if ($percent > 100) {
            $percent = 100;
        }
        return $percent;
    }