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 = UIScreen.main.bounds.size.width / size
        return scale
    }
    
    @inlinable public func auto(_ pt:CGFloat) -> CGFloat {
        let scale = AutoUI.default.scale
        return pt * scale
    }
}
