Liking cljdoc? Tell your friends :D

control-toolbox.math.vector-2d


addclj

(add u v)
source

angle-between-pointsclj

(angle-between-points [ux uy] [vx vy])
source

bearingclj

(bearing [ux uy] [vx vy])

Direction of u with respect to v.

Direction of u with respect to v.
sourceraw docstring

bisect-angleclj

(bisect-angle u v)
source

circle-circle-collisionclj

(circle-circle-collision c1 r1 c2 r2)

Given two circles c1 with radius r1 and c2 with radius r2, return true if circles collide.

Given two circles c1 with radius r1 and c2 with radius r2, return true if circles collide.
sourceraw docstring

closest-point-on-circleclj

(closest-point-on-circle p c r)
source

closest-point-on-lineclj

(closest-point-on-line a b c)
source

cross-productclj

(cross-product [ax ay] [bx by])
source

cross-track-distanceclj

(cross-track-distance start end loc)
source

distclj

(dist u v)
source

dist-manhattanclj

(dist-manhattan [ux uy] [vx vy])
source

distance-behind-lineclj

(distance-behind-line a b d)

Given line ab calculate a point c, d distance behind a.

Given line ab calculate a point c, d distance behind a.
sourceraw docstring

dot-productclj

(dot-product [ux uy] [vx vy])
source

equal?clj

(equal? [ux uy] [vx vy])
source

in-view-cone?clj

(in-view-cone? view-pos direction angle point)
source

line-circle-collisionclj

(line-circle-collision a b c r)

Given line segment AB and circle C with radius R, returns true if circle collides with the line segmen.

Given line segment AB and circle C with radius R, returns true if 
circle collides with the line segmen.
sourceraw docstring

line-intersectionclj

(line-intersection [x1 y1] [x2 y2] [x3 y3] [x4 y4])

Given two line segments ab and cd returns the intersection point if they intersect otherwise nil. http://paulbourke.net/geometry/lineline2d/

Given two line segments ab and cd returns the intersection point if they intersect otherwise nil.
http://paulbourke.net/geometry/lineline2d/
sourceraw docstring

magnitudeclj

(magnitude [ux uy])
source

mulclj

(mul u v)
source

negativeclj

(negative [ux uy])
source

normalizeclj

(normalize [ux uy])
source

octantclj

(octant u)

Provides info on which octant (1-8) the vector lies in.

Provides info on which octant (1-8) the vector lies in.
sourceraw docstring

parallel?clj

(parallel? [ux uy] [vx vy])
source

perpendicular?clj

(perpendicular? u v)
source

point-in-circle?clj

(point-in-circle? [ax ay] [cx cy] r)

Test if point a falls within the circle c with radius r.

Test if point a falls within the circle c with radius r.
sourceraw docstring

point-in-rectangleclj

(point-in-rectangle a b c d [px py])

Given corners of a rectangle a,b,c,d and a point p, returns true if p in the rectangle,

Given corners of a rectangle a,b,c,d and a point p,
returns true if p in the rectangle,
sourceraw docstring

projectclj

(project [ux uy] [vx vy])
source

quadrantclj

(quadrant u)

Provides info on which quadrant (1-4) the vector lies in.

Provides info on which quadrant (1-4) the vector lies in.
sourceraw docstring

rectangle-circle-collisionclj

(rectangle-circle-collision [a b c d] cc r)

Given corners of a rectangle a,b,c,d and a circle with center cc with radius r return true if circle collides with the rectangle.

Given corners of a rectangle a,b,c,d and a circle with
center cc with radius r return true if circle collides with the
rectangle.
sourceraw docstring

rotateclj

(rotate [ux uy] angle)
source

subclj

(sub u v)
source

to-cartesianclj

(to-cartesian r t)
source

to-polarclj

(to-polar [x y])
(to-polar x y)
source

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

× close