(add-vectors v1 & vs)
Add two or more vectors of numbers of the same dimension
Add two or more vectors of numbers of the same dimension
(average-vectors v1 v2)
(average-vectors v1 v2 w)
Average vectors v1
and v2
. If w
is supplied then
make a weighted average where v1
has weight w
and
v2
weight 1-w
. One can also think of this as the midpoint
of two points.
Average vectors `v1` and `v2`. If `w` is supplied then make a weighted average where `v1` has weight `w` and `v2` weight `1-w`. One can also think of this as the midpoint of two points.
(gcd a b)
Find the greatest common denominator of a
and b
.
Always return a non-negative number.
Find the greatest common denominator of `a` and `b`. Always return a non-negative number.
(l1-distance p1 p2)
Find the l1 distance between points p1
and p2
Find the l1 distance between points `p1` and `p2`
(lcm a b)
Find the least common multiple of a
and b
, both positive.
Find the least common multiple of `a` and `b`, both positive.
(linf-distance p1 p2)
Find the l-infinity distance between points p1
and p2
Find the l-infinity distance between points `p1` and `p2`
(ray point dir)
Starting at and including point
a collection of points
moving in steps given by dir
.
Starting at and including `point` a collection of points moving in steps given by `dir`.
(ray-segment n point dir)
the first n
points on the ray defined by point
and dir
the first `n` points on the ray defined by `point` and `dir`
(scale-vector v x)
Scale the vector v
by a factor of x
Scale the vector `v` by a factor of `x`
(subtract-vectors v1 v2)
Subtract two vectors of numbers of the same dimension
Subtract two vectors of numbers of the same dimension
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close