(ensure-even x)
Returns x if even or x+1
if x
is odd.
Returns x if even or `x+1` if `x` is odd.
(ensure-odd x)
Returns x if odd or x+1
if x
is even.
Returns x if odd or `x+1` if `x` is even.
(in-range? [min max] x)
(in-range? min max x)
Returns true if x >= min and x <= max.
Returns true if x >= min and x <= max.
(map-interval x [in1 in2] [out1 out2])
(map-interval x in1 in2 out1 out2)
Maps x from one interval into another. Intervals can be defined as vectors.
Maps x from one interval into another. Intervals can be defined as vectors.
(map-interval-clamped x [in1 in2] [out1 out2])
(map-interval-clamped x [in1 in2] [out1 out2] [c1 c2])
(map-interval-clamped x in1 in2 out1 out2)
(map-interval-clamped x in1 in2 out1 out2 c1 c2)
(norm-range x)
Returns lazy-seq of values in the closed interval [0.0, 1.0] at resolution 1/x.
Returns lazy-seq of values in the closed interval [0.0, 1.0] at resolution 1/x.
(quartile n sorted)
Takes a quartile index (1..4) and sorted seq of samples, returns set of items in quartile.
Takes a quartile index (1..4) and sorted seq of samples, returns set of items in quartile.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close