• Ensures a value is within 0 and max by wrapping max to 0

    Parameters

    • value: number
    • max: number

    Returns number