Liking cljdoc? Tell your friends :D

somekit.vec


addcljs

(add v1 v2)

adds two vectors of same dimension together

adds two vectors of same dimension together
sourceraw docstring

add-scalarcljs

(add-scalar v scalar)

Adds a scalar to a vector

Adds a scalar to a vector
sourceraw docstring

anglecljs

(angle v)

Returns angle of a 2D vector

Returns angle of a 2D vector
sourceraw docstring

angle-betweencljs

(angle-between v1 v2)

Calculates the angle between two 2D Vectors using angle difference.

Calculates the angle between two 2D Vectors using angle difference.
sourceraw docstring

distancecljs

(distance v1 v2)

Calculates distance between two vectors of same dimension

Calculates distance between two vectors of same dimension
sourceraw docstring

divcljs

(div v1 v2)

Divides one vector by another. Both must be same dimension.

Divides one vector by another. Both must be same dimension.
sourceraw docstring

div-scalarcljs

(div-scalar v scalar)

Divides vector by a scalar

Divides vector by a scalar
sourceraw docstring

dotcljs

(dot v1 v2)

Dot product of two vectors

Dot product of two vectors
sourceraw docstring

from-anglecljs

(from-angle theta)

Returns a 2D unit vector with given angle

Returns a 2D unit vector with given angle
sourceraw docstring

from-polarcljs

(from-polar theta radius)

Returns a 2D vector from polar coordinates

Returns a 2D vector from polar coordinates
sourceraw docstring

lengthcljs

(length v)

Returns the length of a vector of any dimension.

Returns the length of a vector of any dimension.
sourceraw docstring

lerpcljs

(lerp v1 v2 t)

Lerps between two vectors

Lerps between two vectors
sourceraw docstring

limitcljs

(limit v l)

If vector v is bigger than limit l, vector gets scaled to l.

If vector v is bigger than limit l, vector gets scaled to l.
sourceraw docstring

mulcljs

(mul v1 v2)

Multiplied two vectors of same dimensions

Multiplied two vectors of same dimensions
sourceraw docstring

mul-scalarcljs

(mul-scalar v scalar)

Multiplies vector by a scalar

Multiplies vector by a scalar
sourceraw docstring

normalizecljs

(normalize v)

Returns a vector of any dimension normalized

Returns a vector of any dimension normalized
sourceraw docstring

randomcljs

(random N)

Returns a random vector of N dimension. Values between 0 and 1.

Returns a random vector of N dimension. Values between 0 and 1.
sourceraw docstring

random-polarcljs

(random-polar)

returns a 2D vector from a random angle and radius between 0 and 1

returns a 2D vector from a random angle and radius between 0 and 1
sourceraw docstring

rotatecljs

(rotate v theta)

rotates a 2D vector by an angle

rotates a 2D vector by an angle
sourceraw docstring

set-lengthcljs

(set-length v l)

Returns the vector v with given length l.

Returns the vector v with given length l.
sourceraw docstring

subcljs

(sub v1 v2)

Substracts 2 vectors of same dimension

Substracts 2 vectors of same dimension
sourceraw docstring

sub-scalarcljs

(sub-scalar v scalar)

Subtracts scalar from vector

Subtracts scalar from vector
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close