<commit_before>//
//  PageViewControllerAppearance.swift
//  Pageboy-Example
//
//  Created by <NAME> on 15/02/2017.
//  Copyright © 2017 <NAME>. All rights reserved.
//

import UIKit

extension PageViewController {
    
    //
    // MARK: Appearance
    //
    
    func updateAppearance(pageOffset: CGFloat) {
        
        var offset = pageOffset
        if offset < 0.0 {
            offset = 1.0 + offset
        }
        
        var integral: Double = 0.0
        let percentage = CGFloat(modf(Double(offset), &integral))
        print(percentage)
        let lowerIndex = Int(floor(pageOffset))
        let upperIndex = Int(ceil(pageOffset))
        
        let lowerGradient = self.gradient(forIndex: lowerIndex)
        let upperGradient = self.gradient(forIndex: upperIndex)
        
        if let topColor = interpolate(betweenColor: lowerGradient.topColor,
                                      and: upperGradient.topColor,
                                      percent: percentage),
            let bottomColor = interpolate(betweenColor: lowerGradient.bottomColor,
                                          and: upperGradient.bottomColor,
                                          percent: percentage) {
            self.gradientView.colors = [topColor, bottomColor]
        }
        
    }
    <commit_msg>Remove logging<commit_after>//
//  PageViewControllerAppearance.swift
//  Pageboy-Example
//
//  Created by <NAME> on 15/02/2017.
//  Copyright © 2017 <NAME>. All rights reserved.
//

import UIKit

extension PageViewController {
    
    //
    // MARK: Appearance
    //
    
    func updateAppearance(pageOffset: CGFloat) {
        
        var offset = pageOffset
        if offset < 0.0 {
            offset = 1.0 + offset
        }
        
        var integral: Double = 0.0
        let percentage = CGFloat(modf(Double(offset), &integral))
        let lowerIndex = Int(floor(pageOffset))
        let upperIndex = Int(ceil(pageOffset))
        
        let lowerGradient = self.gradient(forIndex: lowerIndex)
        let upperGradient = self.gradient(forIndex: upperIndex)
        
        if let topColor = interpolate(betweenColor: lowerGradient.topColor,
                                      and: upperGradient.topColor,
                                      percent: percentage),
            let bottomColor = interpolate(betweenColor: lowerGradient.bottomColor,
                                          and: upperGradient.bottomColor,
                                          percent: percentage) {
            self.gradientView.colors = [topColor, bottomColor]
        }
        
    }
    
{'fraction_non_alphanumeric': 0.08500948766603415, 'fraction_numerical': 0.01366223908918406, 'mean_word_length': 1.5517909002904162, 'pattern_counts': {'":': 0, '<': 9, '<?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': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2011599', 'n_tokens_mistral': 705, 'n_tokens_neox': 646, 'n_words': 152}