Fix tests after rover change
This commit is contained in:
parent
f0f5a6b2e0
commit
93b99b7989
4 changed files with 23 additions and 7 deletions
|
@ -1,6 +1,10 @@
|
|||
package vector
|
||||
|
||||
import "math"
|
||||
import (
|
||||
"math"
|
||||
|
||||
"github.com/mdiluz/rove/pkg/maths"
|
||||
)
|
||||
|
||||
// Vector desribes a 3D vector
|
||||
type Vector struct {
|
||||
|
@ -45,3 +49,8 @@ func (v Vector) Multiplied(val int) Vector {
|
|||
func (v Vector) Divided(val int) Vector {
|
||||
return Vector{v.X / val, v.Y / val}
|
||||
}
|
||||
|
||||
// Abs returns an absolute version of the vector
|
||||
func (v Vector) Abs() Vector {
|
||||
return Vector{maths.Abs(v.X), maths.Abs(v.Y)}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue