<commit_before>//
//  LTEasing.swift
//  LTMorphingLabelDemo
//
//  Created by Lex on 7/1/14.
//  Copyright (c) 2015 lexrus.com. All rights reserved.
//

import Foundation

// http://gsgd.co.uk/sandbox/jquery/easing/jquery.easing.1.3.js
// t = currentTime
// b = beginning
// c = change
// d = duration

public struct LTEasing {
    
    public static func easeOutQuint(_ t: Float, _ b: Float, _ c: Float, _ d: Float = 1.0) -> Float {
        return {
            return c * ($0 * $0 * $0 * $0 * $0 + 1.0) + b
            }(t / d - 1.0)
    }
    
    public static func easeInQuint(_ t: Float, _ b: Float, _ c: Float, _ d: Float = 1.0) -> Float {
        return {
            return c * $0 * $0 * $0 * $0 * $0 + b
            }(t / d)
    }
    <commit_msg>Simplifies easeOutQuint by using pow instead of $0 * $0 for 5 times.<commit_after>//
//  LTEasing.swift
//  LTMorphingLabelDemo
//
//  Created by Lex on 7/1/14.
//  Copyright (c) 2015 lexrus.com. All rights reserved.
//

import Foundation

// http://gsgd.co.uk/sandbox/jquery/easing/jquery.easing.1.3.js
// t = currentTime
// b = beginning
// c = change
// d = duration

public struct LTEasing {
    
    public static func easeOutQuint(_ t: Float, _ b: Float, _ c: Float, _ d: Float = 1.0) -> Float {
        return {
            return c * (pow($0, 5) + 1.0) + b
            }(t / d - 1.0)
    }
    
    public static func easeInQuint(_ t: Float, _ b: Float, _ c: Float, _ d: Float = 1.0) -> Float {
        return {
            return c * $0 * $0 * $0 * $0 * $0 + b
            }(t / d)
    }
    
{'fraction_non_alphanumeric': 0.15586914688903142, 'fraction_numerical': 0.0359204618345093, 'mean_word_length': 1.7320490367775832, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5912427', 'n_tokens_mistral': 607, 'n_tokens_neox': 570, 'n_words': 170}