         self.inchRatio = pointWidth / inchWidth
     }
     
-    private func displayInch()->CGFloat{
+    func displayInch()->CGFloat{
         let bounds = UIScreen.main.bounds
         let width = bounds.width < bounds.height ? bounds.width : bounds.height
         let height = bounds.height > bounds.width ? bounds.height : bounds.width

        return inchDiagonal * point / pointDiagonal
    }
    
    func toMm(inch:CGFloat)->CGFloat{
        return inch * 25.4
    }
    
    func toCm(inch:CGFloat)->CGFloat{
        return inch * 2.54
    }
    
    func toInch(mm:CGFloat)->CGFloat{
        return mm / 25.4
    }
    
    func toInch(cm:CGFloat)->CGFloat{
        return cm / 2.54
    }
    
    private func platform() -> String {
        var size : Int = 0
        sysctlbyname("hw.machine", nil, &size, nil, 0)
        var machine = [CChar](repeating: 0, count: Int(size))

}

public struct TSRect {
    public var origin:TSPoint
    public var size:TSSize
    
    public init(x:CGFloat, y:CGFloat, width:CGFloat, height:CGFloat, unit:TSUnit = .mm){
        self.origin = TSPoint(x: x, y: y, unit: unit)
        self.size = TSSize(width: width, height: height, unit: unit)
    }
    
    public init(origin:TSPoint, size:TSSize){
        assert(origin.unit == size.unit, "Cannot use defferent unit between origin & size")
        self.origin = origin
        self.size = size
    }
    
    public var cgrect:CGRect{
        return CGRect(origin: origin.cgpoint, size: size.cgsize)
    }
    
    public var width:CGFloat{
        return size.width
    }
    
    public var height:CGFloat{
        return size.height
    }
    
    public var minX:CGFloat{
        return origin.x
    }
    
    public var midX:CGFloat{
        return (origin.x * 2 + size.width) / 2
    }
    
    public var maxX:CGFloat{
        return origin.x + size.width
    }
    
    public var minY:CGFloat{
        return origin.y
    }
    
    public var midY:CGFloat{
        return (origin.y * 2 + size.height) / 2
    }
    
    public var maxY:CGFloat{
        return origin.y + size.height
    }
    
}

public struct TSSize {
    public var width:CGFloat
    public var height:CGFloat
    public let unit:TSUnit
    public var rlScale = TSScale()
    
    
    public var cgsize:CGSize{
        return CGSize(width: width.toPoint(unit: unit), height: height.toPoint(unit: unit))
    }
    
    public init(width:CGFloat, height:CGFloat, unit:TSUnit = .mm) {
        self.width = width
        self.height = height
        self.unit = unit
