From e354d779b815e16139f9ac2dcf870d63fe72fe1f Mon Sep 17 00:00:00 2001 From: Emile Date: Thu, 7 Mar 2019 16:18:50 +0100 Subject: removed unused code --- backend/calc.go | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) (limited to 'backend') diff --git a/backend/calc.go b/backend/calc.go index 4ad9ce6..837796a 100644 --- a/backend/calc.go +++ b/backend/calc.go @@ -81,57 +81,6 @@ func CalcAllForcesNode(star structs.Star2D, nodeID int64, theta float64) structs } - //// dont't recurse deeper into the tree - //if localTheta < theta { - // log.Printf("localTheta < theta") - // var force structs.Vec2 - // - // // if the nodeID is not zero, use the center of mass as the other star - // if nodeID != 0 { - // pseudoStarCoodinates := getCenterOfMass(nodeID) - // PseudoStar := structs.Star2D{ - // C: structs.Vec2{ - // X: pseudoStarCoodinates.X, - // Y: pseudoStarCoodinates.Y, - // }, - // V: structs.Vec2{ - // X: 0, - // Y: 0, - // }, - // M: 1000, - // } - // log.Printf("PseudoStar: %v", PseudoStar) - // force = calcForce(star, PseudoStar) - // - // // else, use the star in the node as the other star - // } else { - // if getStarID(nodeID) != 0 { - // var pseudoStar = GetStar(getStarID(nodeID)) - // force = calcForce(star, pseudoStar) - // } - // } - // - // forceX = force.X - // forceY = force.X - // - //// recurse deeper into the tree - //} else { - // log.Printf("localTheta > theta") - // // iterate over all subtrees and add the forces acting through them - // var subtreeIDs [4]int64 - // subtreeIDs = getSubtreeIDs(nodeID) - // for i, subtreeID := range subtreeIDs { - // fmt.Printf("Subtree: %d", i) - // - // // don't recurse into - // if subtreeID != 0 { - // var force = CalcAllForcesNode(star, subtreeID, theta) - // log.Printf("force: %v", force) - // forceX += force.X - // forceY += force.Y - // } - // } - //} log.Println("---------------------------------------") return structs.Vec2{forceX, forceY} } -- cgit 1.4.1