about summary refs log tree commit diff
path: root/print.go
diff options
context:
space:
mode:
authorhanemile <hanemile@protonmail.com>2018-10-04 16:03:53 +0200
committerhanemile <hanemile@protonmail.com>2018-10-04 16:03:53 +0200
commitc603f2d153917d7b76395de05681b2fb3fa3cbcd (patch)
tree1c422a86ed7cc032af7c2c7375d49041d2c37a38 /print.go
parent712f9b26af95afe3a08dbf7993f75c0123f123f6 (diff)
nice prints
Diffstat (limited to 'print.go')
-rw-r--r--print.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/print.go b/print.go
index c24917d..3ef2abc 100644
--- a/print.go
+++ b/print.go
@@ -1,3 +1,5 @@
+// Collection of functions handling printing specific stuff
+
 package main
 
 import (
@@ -10,10 +12,13 @@ func print_arr(arr []star) {
 
 	log.Printf("[+] Printing array")
 
-	// Iterate over all the elements in the array and print their content
+	fmt.Println("x\t\ty\t\t | Fx\t\tFy\t\t | mass\n")
+
+
 	for _, el := range arr{
-		fmt.Printf("%f\t%f\t|%f\t%f\t|%f\n", el.c.x, el.c.y, el.f.x, el.f.y, el.mass)
+		fmt.Printf("%.6f\t%.6f\t | %.6f\t%.6f\t | %.6f\n", el.c.x, el.c.y, el.f.x, el.f.y, el.mass)
 	}
 
-	fmt.Println("---")
+	fmt.Println("")
 }
+