<commit_before>//
//  ValueStepper.swift
//  http://github.com/BalestraPatrick/ValueStepper
//
//  Created by <NAME> on 2/16/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import UIKit

/// Button tags
///
/// - Decrease: Decrease button has tag 0.
/// - Increase: Increase button has tag 1.
private enum Button: Int {
    case decrease
    case increase
}

@IBDesignable public class ValueStepper: UIControl {
    
    // MARK - Public variables
    
    /// Current value and sends UIControlEventValueChanged when modified.
    @IBInspectable public var value: Double = 0.0 {
        didSet {
            if value > maximumValue || value < minimumValue {
               // Value is possibly out of range, it means we're setting up the values so discard any update to the UI.
            } else if oldValue != value {
                sendActions(for: .valueChanged)
                setFormattedValue(value)
                setState()
            }
        }
    }
    
    /// Minimum value that must be the less than the maximum value.<commit_msg>Small change to enum case documentation<commit_after>//
//  ValueStepper.swift
//  http://github.com/BalestraPatrick/ValueStepper
//
//  Created by <NAME> on 2/16/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import UIKit

/// Button tags
///
/// - decrease: decrease button has tag 0.
/// - increase: increase button has tag 1.
private enum Button: Int {
    case decrease
    case increase
}

@IBDesignable public class ValueStepper: UIControl {
    
    // MARK - Public variables
    
    /// Current value and sends UIControlEventValueChanged when modified.
    @IBInspectable public var value: Double = 0.0 {
        didSet {
            if value > maximumValue || value < minimumValue {
               // Value is possibly out of range, it means we're setting up the values so discard any update to the UI.
            } else if oldValue != value {
                sendActions(for: .valueChanged)
                setFormattedValue(value)
                setState()
            }
        }
    }
    
    /// Minimum value that must be the less than the maximum value.
{'fraction_non_alphanumeric': 0.09319664492078285, 'fraction_numerical': 0.012115563839701771, 'mean_word_length': 1.9654696132596685, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '336742', 'n_tokens_mistral': 607, 'n_tokens_neox': 570, 'n_words': 214}