diff options
author | Emile <hanemile@protonmail.com> | 2019-02-07 02:45:33 +0100 |
---|---|---|
committer | Emile <hanemile@protonmail.com> | 2019-02-07 02:45:33 +0100 |
commit | d2d08cecf4746a53df305fb67468919ef9657836 (patch) | |
tree | 29b2823fc9137d9b6566f63a36091f62d62068e6 /update.go | |
parent | 515aeb56e414b4dc43a58171a93c3eaebdcd1906 (diff) |
new model, see the wiki for a description how this all works
Diffstat (limited to 'update.go')
-rw-r--r-- | update.go | 27 |
1 files changed, 0 insertions, 27 deletions
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() -} |