Liking cljdoc? Tell your friends :D

binning


bin-fnclj/s

(bin-fn min max step)

Create a function that returns the interval that a value x falls in. Example: ((bin-fn 0 10 2) 5.5) => [4 6]

Create a function that returns the interval that a value x falls in.
Example:
    ((bin-fn 0 10 2) 5.5) 
    => [4 6]
raw docstring

bounded-bin-fnclj/s

(bounded-bin-fn minimum maximum step)

Create a function that returns the interval that a value x falls in. If the value is out of bounds, returns the nearest valid bin. Example:
((bounded-bin-fn 0 10 2) 5.5) => [4 6] ((bounded-bin-fn 0 10 2) -5) => [0 2] ((bounded-bin-fn 0 10 2) 100) => [8 10

Create a function that returns the interval that a value x falls in. If the value is out of bounds,
returns the nearest valid bin.
Example:  
    ((bounded-bin-fn 0 10 2) 5.5) 
    => [4 6]
    ((bounded-bin-fn 0 10 2) -5) 
    => [0 2]
    ((bounded-bin-fn 0 10 2) 100) 
    => [8 10
raw docstring

bounded-bin-idx-fnclj/s

(bounded-bin-idx-fn minimum maximum step)

Create a function that returns the index of a bin that a value x falls in. If the value is out of bounds, returns the nearest valid idx. Example:
((bounded-bin-idx-fn 0 10 2) 5.5) => 2 ((bounded-bin-idx-fn 0 10 2) -5) => 0 ((bounded-bin-idx-fn 0 10 2) 100) => 4

Create a function that returns the index of a bin that a value x falls in. If the value is out of bounds,
returns the nearest valid idx.
Example:  
    ((bounded-bin-idx-fn 0 10 2) 5.5) 
    => 2
    ((bounded-bin-idx-fn 0 10 2) -5) 
    => 0
    ((bounded-bin-idx-fn 0 10 2) 100) 
    => 4
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close