blob: c24917d8eb2e193269f0a7e432ff7a3839b802d4 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 | package main
import (
	"fmt"
	"log"
)
// print_arr prints all the items in the given array
func print_arr(arr []star) {
	log.Printf("[+] Printing array")
	// Iterate over all the elements in the array and print their content
	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.Println("---")
}
 |