protected function _calculateThreshold($k, $bias)
    {
        if ($k <= ($bias + static::TMIN)) {
            return static::TMIN;
        } elseif ($k >= ($bias + static::TMAX)) {
            return static::TMAX;
        }
        return $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;
    }
protected function _calculateThreshold ( $ k , $ bias ) { if ( $ k <= ( $ bias + static :: TMIN ) ) { return static :: TMIN ; } elseif ( $ k >= ( $ bias + static :: TMAX ) ) { return static :: TMAX ; } return $ k - $ bias ; }
Calculate the bias threshold to fall between TMIN and TMAX.

@param integer $k
@param integer $bias

@return integer
Calculate the bias threshold to fall between TMIN and TMAX .