         return _contentRect.origin.x <= x ? true : false;
     }
     
-    public func isInBoundsRight(var x: CGFloat) -> Bool
-    {
-        x = CGFloat(Int(x * 100.0)) / 100.0;
-        return (_contentRect.origin.x + _contentRect.size.width) >= x ? true : false;
+    public func isInBoundsRight(x: CGFloat) -> Bool
+    {
+        let normalizedX = CGFloat(Int(x * 100.0)) / 100.0;
+        return (_contentRect.origin.x + _contentRect.size.width) >= normalizedX ? true : false;
     }
     
     public func isInBoundsTop(y: CGFloat) -> Bool

    /// offset that allows the chart to be dragged over its bounds on the x-axis
    private var _transOffsetY = CGFloat(0.0);
    
    public init()
    {
    }
    
    public init(width: CGFloat, height: CGFloat)
    {
        setChartDimens(width: width, height: height);
    }
    

import Foundation
import CoreGraphics.CGBase

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