Vector defines a tuple with 3 values in 3d-space
| 6 | |
| 7 | // Vector defines a tuple with 3 values in 3d-space |
| 8 | type Vector struct { |
| 9 | x float64 |
| 10 | y float64 |
| 11 | z float64 |
| 12 | } |
| 13 | |
| 14 | // Distance calculates the distance between to vectors with the Pythagoras theorem |
| 15 | func Distance(a, b Vector) float64 { |
nothing calls this directly
no outgoing calls
no test coverage detected