         matrix.d = _scaleY;
     }
     
-    public func setMinimumScaleX(var xScale: CGFloat)
-    {
-        if (xScale < 1.0)
-        {
-            xScale = 1.0;
-        }
-        
-        _minScaleX = xScale;
+    public func setMinimumScaleX(xScale: CGFloat)
+    {
+        var newValue = xScale;
+        
+        if (newValue < 1.0)
+        {
+            newValue = 1.0;
+        }
+        
+        _minScaleX = newValue;
         
         limitTransAndScale(matrix: &_touchMatrix, content: _contentRect);
     }
     
-    public func setMinimumScaleY(var yScale: CGFloat)
-    {
-        if (yScale < 1.0)
-        {
-            yScale = 1.0;
-        }
-        
-        _minScaleY = yScale;
+    public func setMinimumScaleY(yScale: CGFloat)
+    {
+        var newValue = yScale;
+        
+        if (newValue < 1.0)
+        {
+            newValue = 1.0;
+        }
+        
+        _minScaleY = newValue;
         
         limitTransAndScale(matrix: &_touchMatrix, content: _contentRect);
     }

        return _contentRect.origin.y <= y ? true : false;
    }
    
    public func isInBoundsBottom(var y: CGFloat) -> Bool
    {
        y = CGFloat(Int(y * 100.0)) / 100.0;
        return (_contentRect.origin.y + _contentRect.size.height) >= y ? true : false;
    }
    
    /// returns the current x-scale factor

import Foundation
import CoreGraphics.CGBase

public class ChartViewPortHandler: NSObject
{
    /// matrix used for touch events
    private var _touchMatrix = CGAffineTransformIdentity;
