         centerOn = value
         return self
     }
-    
-    private var needsUpdate: Bool = false
     
     public var bounds: CGRect {
         guard self.nodes.count > 0 else { return CGRectZero }

        computeGravity(nodes)
        
        nodes.forEach{
            let acceleration = $0.force / $0.mass
            $0.force = CGPointZero
            $0.velocity = $0.velocity + acceleration * CGFloat(timeStep)
            if $0.velocity.magnitude > maxVelocity {
                $0.velocity = $0.velocity.normalized * maxVelocity
            }
            
            $0.position = $0.position + $0.velocity * CGFloat(timeStep)
        }
    }
    

        return self
    }
    
    private(set) public var energyThreshold: CGFloat = 0.01
    public func energyThreshold(value: CGFloat) -> Graph {
        energyThreshold = value
        return self
    }
    
    private(set) public var maxVelocity: CGFloat = 1
    public func maxVelocity(value: CGFloat) -> Graph {
        maxVelocity = value
