(clamp x min max)
Constraints x to be closed [min .. max] interval.
Constraints x to be closed [min .. max] interval.
(clamp-normalized x)
Constraints x to closed [0.0 .. 1.0] interval.
Constraints x to closed [0.0 .. 1.0] interval.
(clamp01 x)
Constraints x to closed [0 .. 1] interval.
Constraints x to closed [0 .. 1] interval.
(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.
(mix _ x)
(mix _ x t)
(mix _ a b c u v)
(mix-with _ x t f)
(smoothstep _ e1 e2)
(step _ e)
(msub _ a b)
(* _)
(* _ a)
(* _ a b)
(* _ a b c)
(- _)
(- _ a)
(- _ a b)
(- _ a b c)
(madd _ a b)
(addm _ a b)
(div _)
(div _ a)
(div _ a b)
(div _ a b c)
(+ _)
(+ _ a)
(+ _ a b)
(+ _ a b c)
(abs _)
(subm _ a b)
(-! _)
(-! _ a)
(-! _ a b)
(-! _ a b c)
(*! _)
(*! _ a)
(*! _ a b)
(*! _ a b c)
(subm! _ a b)
(msub! _ a b)
(abs! _)
(madd! _ a b)
(div! _)
(div! _ a)
(div! _ a b)
(div! _ a b c)
(+! _)
(+! _ a)
(+! _ a b)
(+! _ a b c)
(addm! _ a b)
(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.
(normalize _)
(normalize _ norm)
(normalized? _)
(difference _ x)
(intersection _ x)
(union _ x)
(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. If range of input interval is zero, returns min. bound of output.
Maps x from one interval into another. Intervals can be defined as vectors. If range of input interval is zero, returns min. bound of output.
(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)
Takes a number x, input interval and output interval. Returns x mapped proportionally from input to output interval and clamps it to output. If range of input interval is zero, returns min. bound of output.
Takes a number x, input interval and output interval. Returns x mapped proportionally from input to output interval and clamps it to output. If range of input interval is zero, returns min. bound of output.
(norm-range n)
Returns lazy-seq of n values in the closed interval [0.0, 1.0] at resolution 1/x.
Returns lazy-seq of n 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.
(wrap-range x y)
Returns x mod y with result always in semi-closed interval [0..y
Returns x mod y with result always in semi-closed interval [0..y
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close