Liking cljdoc? Tell your friends :D

thi.ng.math.macros


addcljmacro

(add a__1016__auto__ b__1017__auto__)
(add a__1016__auto__ b__1017__auto__ c__1018__auto__)
(add a__1016__auto__ b__1017__auto__ c__1018__auto__ d__1019__auto__)
(add a__1016__auto__
     b__1017__auto__
     c__1018__auto__
     d__1019__auto__
     e__1020__auto__)
(add a__1016__auto__
     b__1017__auto__
     c__1018__auto__
     d__1019__auto__
     e__1020__auto__
     f__1021__auto__)
(add a__1016__auto__
     b__1017__auto__
     c__1018__auto__
     d__1019__auto__
     e__1020__auto__
     f__1021__auto__
     g__1022__auto__)
(add a__1016__auto__
     b__1017__auto__
     c__1018__auto__
     d__1019__auto__
     e__1020__auto__
     f__1021__auto__
     g__1022__auto__
     h__1023__auto__)
source

adddivcljmacro

(adddiv a__1029__auto__ b__1030__auto__ c__1031__auto__)
(adddiv a__1029__auto__ b__1030__auto__ c__1031__auto__ d__1032__auto__)
(adddiv a__1029__auto__
        b__1030__auto__
        c__1031__auto__
        d__1032__auto__
        e__1033__auto__)
(adddiv a__1029__auto__
        b__1030__auto__
        c__1031__auto__
        d__1032__auto__
        e__1033__auto__
        f__1034__auto__)
(adddiv a__1029__auto__
        b__1030__auto__
        c__1031__auto__
        d__1032__auto__
        e__1033__auto__
        f__1034__auto__
        g__1035__auto__)
(adddiv a__1029__auto__
        b__1030__auto__
        c__1031__auto__
        d__1032__auto__
        e__1033__auto__
        f__1034__auto__
        g__1035__auto__
        h__1036__auto__)
source

addmcljmacro

(addm a__1029__auto__ b__1030__auto__ c__1031__auto__)
(addm a__1029__auto__ b__1030__auto__ c__1031__auto__ d__1032__auto__)
(addm a__1029__auto__
      b__1030__auto__
      c__1031__auto__
      d__1032__auto__
      e__1033__auto__)
(addm a__1029__auto__
      b__1030__auto__
      c__1031__auto__
      d__1032__auto__
      e__1033__auto__
      f__1034__auto__)
(addm a__1029__auto__
      b__1030__auto__
      c__1031__auto__
      d__1032__auto__
      e__1033__auto__
      f__1034__auto__
      g__1035__auto__)
(addm a__1029__auto__
      b__1030__auto__
      c__1031__auto__
      d__1032__auto__
      e__1033__auto__
      f__1034__auto__
      g__1035__auto__
      h__1036__auto__)
source

addmsubcljmacro

(addmsub a__1042__auto__ b__1043__auto__ c__1044__auto__ d__1045__auto__)
(addmsub a__1042__auto__
         b__1043__auto__
         c__1044__auto__
         d__1045__auto__
         e__1046__auto__)
(addmsub a__1042__auto__
         b__1043__auto__
         c__1044__auto__
         d__1045__auto__
         e__1046__auto__
         f__1047__auto__)
(addmsub a__1042__auto__
         b__1043__auto__
         c__1044__auto__
         d__1045__auto__
         e__1046__auto__
         f__1047__auto__
         g__1048__auto__)
(addmsub a__1042__auto__
         b__1043__auto__
         c__1044__auto__
         d__1045__auto__
         e__1046__auto__
         f__1047__auto__
         g__1048__auto__
         h__1049__auto__)
source

bitmaskcljmacro

(bitmask pred a)
(bitmask pred a b)
(bitmask pred a b c)
(bitmask pred a b c d)
(bitmask pred a b c d e)
(bitmask pred a b c d e f)
(bitmask pred a b c d e f g)
(bitmask pred a b c d e f g h)

Constructs a bit mask from given values & predicate fn applied to each. If pred returns truthy value the value's related bit is set. Bit values start at 1 and double for successive args (max 8).

Constructs a bit mask from given values & predicate fn applied to
each. If pred returns truthy value the value's related bit is set.
Bit values start at 1 and double for successive args (max 8).
sourceraw docstring

defmathopcljmacro

(defmathop name f)

Constructs macro to build inlined nested expressions which when call will apply f successively to all args. Supports arities 2-8.

Constructs macro to build inlined nested expressions which when
call will apply f successively to all args. Supports arities 2-8.
sourceraw docstring

defmathop2cljmacro

(defmathop2 name f f2)

Constructs macro to build inlined nested expressions which when call will apply f to inner pairs and f2 to combine results.

Constructs macro to build inlined nested expressions which when
call will apply f to inner pairs and f2 to combine results.
sourceraw docstring

defmathop3cljmacro

(defmathop3 name f f2 f3)

Takes f, f2 & f3 as syntax-quoted symbols. Constructs a macro which when called, applies f to all but the last 1 or 2 args. The remaining arg(s) are combined with the first result using f2. Furthermore, for arities 6 and 8, f3 is first applied to the last two args are before the final application of f2. For example:

(defmathop* maddsub `madd `- `*)
(maddsub 2 3 4 5) => (- (madd 2 3 4) 5)
(maddsub 2 3 4 5 6) => (- (madd 2 3 4) (* 5 6))
Takes f, f2 & f3 as syntax-quoted symbols. Constructs a macro which
when called, applies f to all but the last 1 or 2 args. The
remaining arg(s) are combined with the first result using f2.
Furthermore, for arities 6 and 8, f3 is first applied to the last
two args are before the final application of f2. For example:

    (defmathop* maddsub `madd `- `*)
    (maddsub 2 3 4 5) => (- (madd 2 3 4) 5)
    (maddsub 2 3 4 5 6) => (- (madd 2 3 4) (* 5 6))
sourceraw docstring

divcljmacro

(div a__1016__auto__ b__1017__auto__)
(div a__1016__auto__ b__1017__auto__ c__1018__auto__)
(div a__1016__auto__ b__1017__auto__ c__1018__auto__ d__1019__auto__)
(div a__1016__auto__
     b__1017__auto__
     c__1018__auto__
     d__1019__auto__
     e__1020__auto__)
(div a__1016__auto__
     b__1017__auto__
     c__1018__auto__
     d__1019__auto__
     e__1020__auto__
     f__1021__auto__)
(div a__1016__auto__
     b__1017__auto__
     c__1018__auto__
     d__1019__auto__
     e__1020__auto__
     f__1021__auto__
     g__1022__auto__)
(div a__1016__auto__
     b__1017__auto__
     c__1018__auto__
     d__1019__auto__
     e__1020__auto__
     f__1021__auto__
     g__1022__auto__
     h__1023__auto__)
source

if*cljmacro

(if* pred x y)

Returns y if x pred returns truthy, else 0

Returns y if x pred returns truthy, else 0
sourceraw docstring

maddcljmacro

(madd a__1029__auto__ b__1030__auto__ c__1031__auto__)
(madd a__1029__auto__ b__1030__auto__ c__1031__auto__ d__1032__auto__)
(madd a__1029__auto__
      b__1030__auto__
      c__1031__auto__
      d__1032__auto__
      e__1033__auto__)
(madd a__1029__auto__
      b__1030__auto__
      c__1031__auto__
      d__1032__auto__
      e__1033__auto__
      f__1034__auto__)
(madd a__1029__auto__
      b__1030__auto__
      c__1031__auto__
      d__1032__auto__
      e__1033__auto__
      f__1034__auto__
      g__1035__auto__)
(madd a__1029__auto__
      b__1030__auto__
      c__1031__auto__
      d__1032__auto__
      e__1033__auto__
      f__1034__auto__
      g__1035__auto__
      h__1036__auto__)
source

maddsubcljmacro

(maddsub a__1042__auto__ b__1043__auto__ c__1044__auto__ d__1045__auto__)
(maddsub a__1042__auto__
         b__1043__auto__
         c__1044__auto__
         d__1045__auto__
         e__1046__auto__)
(maddsub a__1042__auto__
         b__1043__auto__
         c__1044__auto__
         d__1045__auto__
         e__1046__auto__
         f__1047__auto__)
(maddsub a__1042__auto__
         b__1043__auto__
         c__1044__auto__
         d__1045__auto__
         e__1046__auto__
         f__1047__auto__
         g__1048__auto__)
(maddsub a__1042__auto__
         b__1043__auto__
         c__1044__auto__
         d__1045__auto__
         e__1046__auto__
         f__1047__auto__
         g__1048__auto__
         h__1049__auto__)
source

maxcljmacro

(max a b)
(max a b c)
(max a b c d)
(max a b c d e)
(max a b c d e f)
(max a b c d e f g)
(max a b c d e f g h)
source

mincljmacro

(min a b)
(min a b c)
(min a b c d)
(min a b c d e)
(min a b c d e f)
(min a b c d e f g)
(min a b c d e f g h)
source

mixcljmacro

(mix a b t)
(mix a b c d u v)
(mix a b c d e f g h u v w)

Linear, bi-linear & tri-linear interpolation

Linear, bi-linear & tri-linear interpolation
sourceraw docstring

msubcljmacro

(msub a__1029__auto__ b__1030__auto__ c__1031__auto__)
(msub a__1029__auto__ b__1030__auto__ c__1031__auto__ d__1032__auto__)
(msub a__1029__auto__
      b__1030__auto__
      c__1031__auto__
      d__1032__auto__
      e__1033__auto__)
(msub a__1029__auto__
      b__1030__auto__
      c__1031__auto__
      d__1032__auto__
      e__1033__auto__
      f__1034__auto__)
(msub a__1029__auto__
      b__1030__auto__
      c__1031__auto__
      d__1032__auto__
      e__1033__auto__
      f__1034__auto__
      g__1035__auto__)
(msub a__1029__auto__
      b__1030__auto__
      c__1031__auto__
      d__1032__auto__
      e__1033__auto__
      f__1034__auto__
      g__1035__auto__
      h__1036__auto__)
source

msubaddcljmacro

(msubadd a__1042__auto__ b__1043__auto__ c__1044__auto__ d__1045__auto__)
(msubadd a__1042__auto__
         b__1043__auto__
         c__1044__auto__
         d__1045__auto__
         e__1046__auto__)
(msubadd a__1042__auto__
         b__1043__auto__
         c__1044__auto__
         d__1045__auto__
         e__1046__auto__
         f__1047__auto__)
(msubadd a__1042__auto__
         b__1043__auto__
         c__1044__auto__
         d__1045__auto__
         e__1046__auto__
         f__1047__auto__
         g__1048__auto__)
(msubadd a__1042__auto__
         b__1043__auto__
         c__1044__auto__
         d__1045__auto__
         e__1046__auto__
         f__1047__auto__
         g__1048__auto__
         h__1049__auto__)
source

mulcljmacro

(mul a__1016__auto__ b__1017__auto__)
(mul a__1016__auto__ b__1017__auto__ c__1018__auto__)
(mul a__1016__auto__ b__1017__auto__ c__1018__auto__ d__1019__auto__)
(mul a__1016__auto__
     b__1017__auto__
     c__1018__auto__
     d__1019__auto__
     e__1020__auto__)
(mul a__1016__auto__
     b__1017__auto__
     c__1018__auto__
     d__1019__auto__
     e__1020__auto__
     f__1021__auto__)
(mul a__1016__auto__
     b__1017__auto__
     c__1018__auto__
     d__1019__auto__
     e__1020__auto__
     f__1021__auto__
     g__1022__auto__)
(mul a__1016__auto__
     b__1017__auto__
     c__1018__auto__
     d__1019__auto__
     e__1020__auto__
     f__1021__auto__
     g__1022__auto__
     h__1023__auto__)
source

subcljmacro

(sub a__1016__auto__ b__1017__auto__)
(sub a__1016__auto__ b__1017__auto__ c__1018__auto__)
(sub a__1016__auto__ b__1017__auto__ c__1018__auto__ d__1019__auto__)
(sub a__1016__auto__
     b__1017__auto__
     c__1018__auto__
     d__1019__auto__
     e__1020__auto__)
(sub a__1016__auto__
     b__1017__auto__
     c__1018__auto__
     d__1019__auto__
     e__1020__auto__
     f__1021__auto__)
(sub a__1016__auto__
     b__1017__auto__
     c__1018__auto__
     d__1019__auto__
     e__1020__auto__
     f__1021__auto__
     g__1022__auto__)
(sub a__1016__auto__
     b__1017__auto__
     c__1018__auto__
     d__1019__auto__
     e__1020__auto__
     f__1021__auto__
     g__1022__auto__
     h__1023__auto__)
source

subdivcljmacro

(subdiv a__1029__auto__ b__1030__auto__ c__1031__auto__)
(subdiv a__1029__auto__ b__1030__auto__ c__1031__auto__ d__1032__auto__)
(subdiv a__1029__auto__
        b__1030__auto__
        c__1031__auto__
        d__1032__auto__
        e__1033__auto__)
(subdiv a__1029__auto__
        b__1030__auto__
        c__1031__auto__
        d__1032__auto__
        e__1033__auto__
        f__1034__auto__)
(subdiv a__1029__auto__
        b__1030__auto__
        c__1031__auto__
        d__1032__auto__
        e__1033__auto__
        f__1034__auto__
        g__1035__auto__)
(subdiv a__1029__auto__
        b__1030__auto__
        c__1031__auto__
        d__1032__auto__
        e__1033__auto__
        f__1034__auto__
        g__1035__auto__
        h__1036__auto__)
source

submcljmacro

(subm a__1029__auto__ b__1030__auto__ c__1031__auto__)
(subm a__1029__auto__ b__1030__auto__ c__1031__auto__ d__1032__auto__)
(subm a__1029__auto__
      b__1030__auto__
      c__1031__auto__
      d__1032__auto__
      e__1033__auto__)
(subm a__1029__auto__
      b__1030__auto__
      c__1031__auto__
      d__1032__auto__
      e__1033__auto__
      f__1034__auto__)
(subm a__1029__auto__
      b__1030__auto__
      c__1031__auto__
      d__1032__auto__
      e__1033__auto__
      f__1034__auto__
      g__1035__auto__)
(subm a__1029__auto__
      b__1030__auto__
      c__1031__auto__
      d__1032__auto__
      e__1033__auto__
      f__1034__auto__
      g__1035__auto__
      h__1036__auto__)
source

submaddcljmacro

(submadd a__1042__auto__ b__1043__auto__ c__1044__auto__ d__1045__auto__)
(submadd a__1042__auto__
         b__1043__auto__
         c__1044__auto__
         d__1045__auto__
         e__1046__auto__)
(submadd a__1042__auto__
         b__1043__auto__
         c__1044__auto__
         d__1045__auto__
         e__1046__auto__
         f__1047__auto__)
(submadd a__1042__auto__
         b__1043__auto__
         c__1044__auto__
         d__1045__auto__
         e__1046__auto__
         f__1047__auto__
         g__1048__auto__)
(submadd a__1042__auto__
         b__1043__auto__
         c__1044__auto__
         d__1045__auto__
         e__1046__auto__
         f__1047__auto__
         g__1048__auto__
         h__1049__auto__)
source

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

× close