(b Vector)
| 42 | } |
| 43 | |
| 44 | func (a Vector) Cross(b Vector) Vector { |
| 45 | x := a.Y*b.Z - a.Z*b.Y |
| 46 | y := a.Z*b.X - a.X*b.Z |
| 47 | z := a.X*b.Y - a.Y*b.X |
| 48 | return Vector{x, y, z} |
| 49 | } |
| 50 | |
| 51 | func (a Vector) Normalize() Vector { |
| 52 | d := a.Length() |
no outgoing calls
no test coverage detected