gdl.math.vector

API for using com.badlogic.gdx.math.Vector2 with clojure [x y] vectors.

add

(add v1 v2)

direction

(direction [sx sy] [tx ty])

distance

(distance v1 v2)

get-angle-from-vector

(get-angle-from-vector v)
converts theta of Vector2 to angle from top (top is 0 degree, moving left is 90 degree etc.), ->counterclockwise

get-normal-vectors

(get-normal-vectors [x y])

length

(length v)

normalise

(normalise v)

normalised?

(normalised? v)

scale

(scale v n)