about summary refs log tree commit diff
path: root/print.go
blob: 3ef2abc0236fcee0dfbd577afea1d5c1870b0a44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Collection of functions handling printing specific stuff

package main

import (
	"fmt"
	"log"
)

// print_arr prints all the items in the given array
func print_arr(arr []star) {

	log.Printf("[+] Printing array")

	fmt.Println("x\t\ty\t\t | Fx\t\tFy\t\t | mass\n")


	for _, el := range arr{
		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("")
}