def value01(v):
    """Round float to 0 or 1 int if equal.

    >>> value01(0.0)
    0
    >>> value01(1.0)
    1
    >>> value01(0.5)
    0.5
    >>> value01(False)
    0
    >>> value01(100)
    1
    """
    if v <= 0:
        return 0
    if v >= 1:
        return 1
    return v