Liking cljdoc? Tell your friends :D

genartlib.algebra


angleclj

(angle x1 y1 x2 y2)

Returns the angle between two points in radians. Values are between 0 and 2 * PI.

Returns the angle between two points in radians. Values are between
0 and 2 * PI.
sourceraw docstring

angular-coordsclj

(angular-coords center-x center-y theta magnitude)

Returns an [x y] vector representing a point that is offset from a center ([center-x center-y]) by a given angle and magnitude

Returns an [x y] vector representing a point that is
offset from a center ([center-x center-y]) by a given
angle and magnitude
sourceraw docstring

avgclj

(avg & values)

Returns the average of the arguments

Returns the average of the arguments
sourceraw docstring

interpolateclj

(interpolate start finish t)

Interpolates a point between [start, finish] at point t, where t is between 0.0 and 1.0

Interpolates a point between [start, finish] at point t, where
t is between 0.0 and 1.0
sourceraw docstring

interpolate-multiclj

(interpolate-multi start-point finish-point t)

Interpolates between two multi-dimensional points at t, where t is between 0.0 and 1.0

Interpolates between two multi-dimensional points at t, where
t is between 0.0 and 1.0
sourceraw docstring

line-intersectionclj

(line-intersection line1 line2)

Finds the intersection of two lines. Each line argument is a vector of the form [slope y-intersect start-x end-x]

Finds the intersection of two lines.  Each line argument is a vector
of the form [slope y-intersect start-x end-x]
sourceraw docstring

lines-intersection-pointclj

(lines-intersection-point [start-x-1 start-y-1]
                          [end-x-1 end-y-1]
                          [start-x-2 start-y-2]
                          [end-x-2 end-y-2])
source

point-angleclj

(point-angle [x1 y1] [x2 y2])

Returns the angle between two points in radians

Returns the angle between two points in radians
sourceraw docstring

point-distclj

(point-dist [x1 y1] [x2 y2])

Returns the euclidean distance between two points

Returns the euclidean distance between two points
sourceraw docstring

point-slopeclj

(point-slope [x1 y1] [x2 y2])

Returns the slope of a line between two points: (x1, y1), (x2, y2)

Returns the slope of a line between two points: (x1, y1), (x2, y2)
sourceraw docstring

point-to-line-distclj

(point-to-line-dist [x1 y1] [x2 y2] [x0 y0])

[x1 y1] and [x2 y2] define the line, [x0 y0] defines the point

[x1 y1] and [x2 y2] define the line, [x0 y0] defines
the point
sourceraw docstring

rescaleclj

(rescale value old-min old-max new-min new-max)

Rescales value from range [old-min, old-max] to [new-min, new-max]

Rescales value from range [old-min, old-max] to [new-min, new-max]
sourceraw docstring

slopeclj

(slope x1 y1 x2 y2)

Returns the slope of a line between two points: (x1, y1), (x2, y2)

Returns the slope of a line between two points: (x1, y1), (x2, y2)
sourceraw docstring

y-interceptclj

(y-intercept slope x1 y1)

Returns the y-intercept of a line with a given slope and one point on the line (x1, y1)

Returns the y-intercept of a line with a given slope
and one point on the line (x1, y1)
sourceraw docstring

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

× close