<commit_before>import CoreGraphics

/// SwiftKit extensions to CGSize
public extension CGSize {
    /// Convenience initializer to create a square size
    public init(squareSize: CGFloat) {
        self.init(width: squareSize, height: squareSize)
    }
    
    /// Return a new size that's the product of scaling this size in both dimensions
    public func sizeWithScale(scale: CGFloat) -> CGSize {
        var size = self
        size.width *= scale
        size.height *= scale
        
        return size
    }
    
    /// Return the point at which this size is centered within another size
    public func centerPointInSize(size: CGSize) -> CGPoint {
        return CGPoint(
            x: floor((size.width - self.width) / 2),
            y: floor((size.height - self.height) / 2)
        )
    }
}<commit_msg>Add CGSize.toCGPoint()<commit_after>import CoreGraphics

/// SwiftKit extensions to CGSize
public extension CGSize {
    /// Convenience initializer to create a square size
    public init(squareSize: CGFloat) {
        self.init(width: squareSize, height: squareSize)
    }
    
    /// Return a new size that's the product of scaling this size in both dimensions
    public func sizeWithScale(scale: CGFloat) -> CGSize {
        var size = self
        size.width *= scale
        size.height *= scale
        
        return size
    }
    
    /// Return the point at which this size is centered within another size
    public func centerPointInSize(size: CGSize) -> CGPoint {
        return CGPoint(
            x: floor((size.width - self.width) / 2),
            y: floor((size.height - self.height) / 2)
        )
    }
    
    /// Conver this size structure into a point structure, with x = width, y = height
    public func toCGPoint() -> CGPoint {
        return CGPoint(x: self.width, y: self.height)
    }
}
{'fraction_non_alphanumeric': 0.08962520369364475, 'fraction_numerical': 0.0021727322107550242, 'mean_word_length': 2.1649484536082473, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '5918332', 'n_tokens_mistral': 529, 'n_tokens_neox': 504, 'n_words': 179}