(++ & gs)
Convenience wrapper for add to accept grids as args.
Convenience wrapper for add to accept grids as args.
(-- & gs)
Convenience wrapper for subtract to accept grids as args.
Convenience wrapper for subtract to accept grids as args.
(add & gs)
Constructs a grid with all given grids added together.
Constructs a grid with all given grids added together.
(decorate g & escape-codes)
Decorates a grid with given ansi-escape-codes.
Decorates a grid with given ansi-escape-codes.
(subtract & gs)
Returns the first grid minus keys in rest of the grids.
Returns the first grid minus keys in rest of the grids.
(tf-hflip)
Returns a function that horizontally flips a coordinate.
Returns a function just to keep it consistent with other tf-* functions.
For example, ((tf-hflip) [1 2]) = [-1 2].
Returns a function that horizontally flips a coordinate. Returns a function just to keep it consistent with other tf-* functions. For example, ((tf-hflip) [1 2]) = [-1 2].
(tf-project target-dimension)
(tf-project target-dimension project-fn)
Returns a function that projects a coordinate into given dimension.
For example, ((tf-project 2) [1 2 3 4 5]) = [1 2].
A project-fn can be passed in to change how a coordinate is projected. By default, the identity function is used.
Returns a function that projects a coordinate into given dimension. For example, ((tf-project 2) [1 2 3 4 5]) = [1 2]. A project-fn can be passed in to change how a coordinate is projected. By default, the identity function is used.
(tf-rotate radians)
Returns a function that rotates a coordinate by given angle in radians.
Returns a function that rotates a coordinate by given angle in radians.
(tf-rotate-90-degrees)
Returns a function that rotates a coordinate by 90 degrees.
Returns a function that rotates a coordinate by 90 degrees.
(tf-scale & ns)
Returns a function that scales a coordinate by given amounts.
For example, ((tf-scale 10 2) [3 2]) = [30 4].
Returns a function that scales a coordinate by given amounts. For example, ((tf-scale 10 2) [3 2]) = [30 4].
(tf-shear a b)
Returns a function that shears a coordinate by given factors.
See https://en.wikipedia.org/wiki/Shear_mapping.
For example, ((tf-shear 2 3) [10 5]) = [10 + 2 * 5, 5 + 3 * 10] = [20 35].
Returns a function that shears a coordinate by given factors. See https://en.wikipedia.org/wiki/Shear_mapping. For example, ((tf-shear 2 3) [10 5]) = [10 + 2 * 5, 5 + 3 * 10] = [20 35].
(tf-translate & deltas)
Returns a function that translates a coordinate by given deltas.
For example, ((tf-translate 10 20) [1 2]) = [11 22].
Returns a function that translates a coordinate by given deltas. For example, ((tf-translate 10 20) [1 2]) = [11 22].
(tf-transpose)
Returns a function that transposes a coordinate.
Returns a function just to keep it consistent with other tf-* functions.
For example, ((tf-transpose) [1 2]) = [2 1].
Returns a function that transposes a coordinate. Returns a function just to keep it consistent with other tf-* functions. For example, ((tf-transpose) [1 2]) = [2 1].
(tf-vflip)
Returns a function that vertically flips a coordinate.
Returns a function just to keep it consistent with other tf-* functions.
For example, ((tf-vflip) [1 2]) = [1 -2].
Returns a function that vertically flips a coordinate. Returns a function just to keep it consistent with other tf-* functions. For example, ((tf-vflip) [1 2]) = [1 -2].
(transform g f)
(transform g f dimension)
Transforms a grid into another grid using given transformation function.
A transformation function accepts a key (coordinate vector) and returns another key.
For example transformation functions, take a look at the tf-* functions.
Transforms a grid into another grid using given transformation function. A transformation function accepts a key (coordinate vector) and returns another key. For example transformation functions, take a look at the tf-* functions.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close