     }
     
     private func applyBarnesHut(node: Node, quad: Quad<Node>) {
+//        func updateForce(node: Node, direction)
+        
         let s = (quad.bounds.width + quad.bounds.height)/2
         let d = (quad.center - node.position).magnitude
         

        repulsion = value
        return self
    }
    
    /// Range of [0,1]
    private(set) public var theta: CGFloat = 0.8

            let dq = quad.center - node.position
            let distance = dq.magnitude
            let direction = dq.normalized
            if let max = maxDistance {
                if distance < max(node) {
                    node.force = node.force + direction * repulsion * CGFloat(quad.count) / (distance * distance * 0.5)
                }
            }
            else {
                node.force = node.force + direction * repulsion * CGFloat(quad.count) / (distance * distance * 0.5)
            }
        }
    }
}