import UIKit

@inlinable public func auto(_ pt:CGFloat) -> CGFloat {
    let scale = AutoUI.default.scale
    return pt * scale
}

open class AutoUI {
    public static let `default` = AutoUI()

    public var scale : CGFloat = 1
    
    public func getScale(size:CGFloat) -> CGFloat {
        scale = size / UIScreen.main.bounds.size.width
        return scale
    }
    
    @inlinable public func auto(_ pt:CGFloat) -> CGFloat {
        let scale = AutoUI.default.scale
        return pt * scale
    }
}
