(bearing [ux uy] [vx vy])
Direction of u with respect to v.
Direction of u with respect to v.
(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.
(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.
(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.
(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/
(octant u)
Provides info on which octant (1-8) the vector lies in.
Provides info on which octant (1-8) the vector lies in.
(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.
(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,
(quadrant u)
Provides info on which quadrant (1-4) the vector lies in.
Provides info on which quadrant (1-4) the vector lies in.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close