<commit_before>//
//  HexagonLoaderView.swift
//  HexagonLoader
//
//  Created by <NAME> on 25/12/2016.
//  Copyright © 2016 Small Screen Science Ltd. All rights reserved.
//


/**
 * Glossary: 
    S -> Side length
    R -> Radius of outer circle (ref to image - Forumula.png) --> S/ 2
    N -> Number of sides
    theta -> 2.0*pi/N
 * Formulae used for drawing:
 * Edge points of Hexagon: 
    x[n] = R * cos(2*pi*n/N + theta) + x_centre
    y[n] = R * sin(2*pi*n/N + theta) + y_centre
 * Radius of Inner Circle
    r = (sqrt(3) * S)/4
 *
 */
import UIKit

private let steps = 25
private let numberOfSides: CGFloat = 6

public enum HexagonLoaderBackground: Int {
    case light
    case dark
    case transparent
    
    public static let all:[HexagonLoaderBackground] = [.light, .dark, transparent]
    
    public func description() -> String {
        switch self {
        case .light:
            return "Light";
        case .dark:
            return "Dark";
        case .transparent :
            return "Transparent";
        }
    }
}

/**
 * Loader config
 */
public struct HexagonLoaderConfig {
    
    /**
     *  Length of each side
     */
    public var hexagonSideLength: CGFloat = 60
    
    /**
     *  Inner offset for each Hexagon
     */
    public var hexagonInnerOffset: CGFloat = 2
    <commit_msg>Changes to make the config class visible in Objective C<commit_after>//
//  HexagonLoaderView.swift
//  HexagonLoader
//
//  Created by <NAME> on 25/12/2016.
//  Copyright © 2016 Small Screen Science Ltd. All rights reserved.
//


/**
 * Glossary: 
    S -> Side length
    R -> Radius of outer circle (ref to image - Forumula.png) --> S/ 2
    N -> Number of sides
    theta -> 2.0*pi/N
 * Formulae used for drawing:
 * Edge points of Hexagon: 
    x[n] = R * cos(2*pi*n/N + theta) + x_centre
    y[n] = R * sin(2*pi*n/N + theta) + y_centre
 * Radius of Inner Circle
    r = (sqrt(3) * S)/4
 *
 */
import UIKit

private let steps = 25
private let numberOfSides: CGFloat = 6

public enum HexagonLoaderBackground: Int {
    case light
    case dark
    case transparent
    
    public static let all:[HexagonLoaderBackground] = [.light, .dark, transparent]
    
    public func description() -> String {
        switch self {
        case .light:
            return "Light";
        case .dark:
            return "Dark";
        case .transparent :
            return "Transparent";
        }
    }
}

/**
 * Loader config
 */
public class HexagonLoaderConfig {
    
    /**
     *  Length of each side
     */
    public var hexagonSideLength: CGFloat = 60
    
    /**
     *  Inner offset for each Hexagon
     */
    public var hexagonInnerOffset: CGFloat = 2
    
{'fraction_non_alphanumeric': 0.11049314052651094, 'fraction_numerical': 0.01853911753800519, 'mean_word_length': 2.0111607142857144, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '3212324', 'n_tokens_mistral': 921, 'n_tokens_neox': 853, 'n_words': 277}