     /// Sets the maximum scale factor for the x-axis
     public func setMaximumScaleX(xScale: CGFloat)
     {
-        _maxScaleX = xScale
+        var newValue = xScale
+        
+        if (newValue == 0.0)
+        {
+            newValue = CGFloat.max
+        }
+        
+        _maxScaleX = newValue
         
         limitTransAndScale(matrix: &_touchMatrix, content: _contentRect)
     }

    public func setMinMaxScaleX(minScaleX minScaleX: CGFloat, maxScaleX: CGFloat)
    {
        var newMin = minScaleX
        
        if (newMin < 1.0)
        {
            newMin = 1.0
        }
        
        _minScaleX = newMin

    /// Sets the maximum scale factor for the y-axis
    public func setMaximumScaleY(yScale: CGFloat)
    {
        var newValue = yScale
        
        if (newValue == 0.0)
        {
            newValue = CGFloat.max
        }
        
        _maxScaleY = newValue
        
        limitTransAndScale(matrix: &_touchMatrix, content: _contentRect)
    }
