TrueBV\Punycode::calculateThreshold PHP Method

calculateThreshold() protected method

protected calculateThreshold ( $k, $bias )
    protected function calculateThreshold($k, $bias)
    {
        if ($k <= $bias + static::TMIN) {
            return static::TMIN;
        } elseif ($k >= $bias + static::TMAX) {
            return static::TMAX;
        }
        return $k - $bias;
    }