about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-03-07 16:18:50 +0100
committerEmile <hanemile@protonmail.com>2019-03-07 16:18:50 +0100
commite354d779b815e16139f9ac2dcf870d63fe72fe1f (patch)
tree05d9561885b315221eb08c51252ec666ec96ba92
parent14ac5133afdab7704cfc64e8eb0c699949a47aa4 (diff)
removed unused code
-rw-r--r--backend/calc.go51
1 files changed, 0 insertions, 51 deletions
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}
 }