def fis_trimf(x:float, a:float, b:float, c:float):
    """Triangular Member Function"""
    t1 = (x - a) / (b - a)
    t2 = (c - x) / (c - b)
    if (a == b) and (b == c):
        return float(x == a)
    if (a == b):
        return (t2 * float(b <= x) * float(x <= c))
    if (b == c):
        return (t1 * float(a <= x) * float(x <= b))
    return max(min(t1, t2), 0)