This commit is contained in:
nek0 2018-07-02 18:22:00 +02:00
parent 0d28d28ee1
commit d5b2729b2a

View file

@ -54,6 +54,7 @@ springField :: AG.Graph MMNode -> AG.Graph MMNode
springField inGraph = springField inGraph =
calcul inGraph calcul inGraph
where where
-- This could be optimized in such a way, that you update both computation partners at once.
calculDelta :: AG.Graph MMNode -> MMNode -> (Int, V2 Double) calculDelta :: AG.Graph MMNode -> MMNode -> (Int, V2 Double)
calculDelta graph node = calculDelta graph node =
let accel = foldl sproing (V2 0 0 :: V2 Double) (vertexList graph) let accel = foldl sproing (V2 0 0 :: V2 Double) (vertexList graph)