(binary-search vec value)
Finds index of rightmost value in sorted vector that is less or equal to given value.
Finds index of rightmost value in sorted vector that is less or equal to given value.
(find-rect xs ys x y)
Finds indices of region (rectangle) in grid that contains given point. Params: xs, ys - coordinates of grid x, y - coordinates of point we to find region for
Finds indices of region (rectangle) in grid that contains given point. Params: xs, ys - coordinates of grid x, y - coordinates of point we to find region for
(find-segment xs x)
Finds indices of segment that contains given point. Params: xs - sorted coordinates of segments x - point
Finds indices of segment that contains given point. Params: xs - sorted coordinates of segments x - point
(translate-domain f [a b] [c d])
Translates domain [c d] of function f to [a b] and returns new function g such that: f(c) = g(a), f(d) = g(b)
Translates domain [c d] of function f to [a b] and returns new function g such that: f(c) = g(a), f(d) = g(b)
(uniform [a b] n)
Splits segment [a b] to n points with equals distance between them.
Splits segment [a b] to n points with equals distance between them.
cljdoc builds & hosts documentation for Clojure/Script libraries
Ctrl+k | Jump to recent docs |
← | Move to previous article |
→ | Move to next article |
Ctrl+/ | Jump to the search field |