def get_denominator(denominator: float | int) -> int:
    """
    If denominator is a float or int, then return the integer value.

    If denominator is a float, then round it to the nearest integer. If the
    rounded value is 0, then return 1.

    Parameters
    ----------
    denominator : Union[float, int]
        The denominator.

    Returns
    -------
    int
        The denominator as integer.
    """
    return int(max(round(denominator, 0), 1))