From d2d08cecf4746a53df305fb67468919ef9657836 Mon Sep 17 00:00:00 2001 From: Emile Date: Thu, 7 Feb 2019 02:45:33 +0100 Subject: new model, see the wiki for a description how this all works --- update.go | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 update.go (limited to 'update.go') diff --git a/update.go b/update.go deleted file mode 100644 index 402a64c..0000000 --- a/update.go +++ /dev/null @@ -1,27 +0,0 @@ -package main - -import ( - "log" - "net/http" - "strconv" - - "github.com/gorilla/mux" -) - -// updateCenterOfMassHandler updates the center of mass in each node in tree with the given index -func updateCenterOfMassHandler(w http.ResponseWriter, r *http.Request) { - log.Println("Updating the center of mass") - vars := mux.Vars(r) - treeindex, _ := strconv.ParseInt(vars["treeindex"], 10, 0) - - treeArray[treeindex].CalcCenterOfMass() -} - -// updateTotalMassHandler updates the total mass in each node in the tree with the given index -func updateTotalMassHandler(w http.ResponseWriter, r *http.Request) { - log.Println("Updating the total mass") - vars := mux.Vars(r) - treeindex, _ := strconv.ParseInt(vars["treeindex"], 10, 0) - - treeArray[treeindex].CalcTotalMass() -} -- cgit 1.4.1