abs

abs-floatclj

abs-intclj

ceil

constrain

constrain-floatclj

constrain-intclj

dist

exp

floor

lerp

log

mag

map-range

norm

pow

round

sq

sqrt

abs

Arguments
[n]
Docstring
Calculates the absolute value (magnitude) of a number. The
absolute value of a number is always positive. Dynamically casts to
an int or float appropriately
Works only inside sketch functions?
No
Original Processing method
abs()

abs-floatclj

Arguments
[n]
Docstring
Calculates the absolute value (magnitude) of a number. The absolute
value of a number is always positive. Takes and returns a float.
Works only inside sketch functions?
No
Original Processing method
abs()

abs-intclj

Arguments
[n]
Docstring
Calculates the absolute value (magnitude) of a number. The absolute
value of a number is always positive. Takes and returns an int.
Works only inside sketch functions?
No
Original Processing method
abs()

ceil

Arguments
[n]
Docstring
Calculates the closest int value that is greater than or equal to
the value of the parameter. For example, (ceil 9.03) returns the
value 10.
Works only inside sketch functions?
No
Original Processing method
ceil()

constrain

Arguments
[amt low high]
Docstring
Constrains a value to not exceed a maximum and minimum value.
Works only inside sketch functions?
No
Original Processing method
constrain()

constrain-floatclj

Arguments
[amt low high]
Docstring
Constrains a value to not exceed a maximum and minimum value. All
args are cast to floats.
Works only inside sketch functions?
No
Original Processing method
constrain()

constrain-intclj

Arguments
[amt low high]
Docstring
Constrains a value to not exceed a maximum and minimum value. All
args are cast to ints.
Works only inside sketch functions?
No
Original Processing method
constrain()

dist

Arguments
[x1 y1 z1 x2 y2 z2][x1 y1 x2 y2]
Docstring
Calculates the distance between two points
Works only inside sketch functions?
No
Original Processing method
dist()

exp

Arguments
[val]
Docstring
Returns Euler's number e (2.71828...) raised to the power of the
value parameter.
Works only inside sketch functions?
No
Original Processing method
exp()

floor

Arguments
[n]
Docstring
Calculates the closest int value that is less than or equal to the
value of the parameter. For example, (floor 9.03) returns the value 9.
Works only inside sketch functions?
No
Original Processing method
floor()

lerp

Arguments
[start stop amt]
Docstring
Calculates a number between two numbers at a specific
increment. The amt parameter is the amount to interpolate between
the two values where 0.0 equal to the first point, 0.1 is very near
the first point, 0.5 is half-way in between, etc. The lerp function
is convenient for creating motion along a straight path and for
drawing dotted lines.
Works only inside sketch functions?
No
Original Processing method
lerp()

log

Arguments
[val]
Docstring
Calculates the natural logarithm (the base-e logarithm) of a
number. This function expects the values greater than 0.0.
Works only inside sketch functions?
No
Original Processing method
log()

mag

Arguments
[a b c][a b]
Docstring
Calculates the magnitude (or length) of a vector. A vector is a
direction in space commonly used in computer graphics and linear
algebra. Because it has no start position, the magnitude of a vector
can be thought of as the distance from coordinate (0,0) to its (x,y)
value. Therefore, mag is a shortcut for writing (dist 0 0 x y).
Works only inside sketch functions?
No
Original Processing method
mag()

map-range

Arguments
[val low1 high1 low2 high2]
Docstring
Re-maps a number from one range to another.

Numbers outside the range are not clamped to 0 and 1, because
out-of-range values are often intentional and useful.
Works only inside sketch functions?
No
Original Processing method
map()

norm

Arguments
[val start stop]
Docstring
Normalize a value to exist between 0 and 1 (inclusive).
Works only inside sketch functions?
Yes
Original Processing method
norm()

pow

Arguments
[num exponent]
Docstring
Facilitates exponential expressions. The pow() function is an
efficient way of multiplying numbers by themselves (or their
reciprocal) in large quantities. For example, (pow 3 5) is
equivalent to the expression (* 3 3 3 3 3) and (pow 3 -5) is
equivalent to (/ 1 (* 3 3 3 3 3)).
Works only inside sketch functions?
No
Original Processing method
pow()

round

Arguments
[val]
Docstring
Calculates the integer closest to the value parameter. For example,
(round 9.2) returns the value 9.
Works only inside sketch functions?
No
Original Processing method
round()

sq

Arguments
[a]
Docstring
Squares a number (multiplies a number by itself). The result is
always a positive number, as multiplying two negative numbers always
yields a positive result. For example, -1 * -1 = 1.
Works only inside sketch functions?
No
Original Processing method
sq()

sqrt

Arguments
[a]
Docstring
Calculates the square root of a number. The square root of a number
is always positive, even though there may be a valid negative
root. The square root s of number a is such that (= a (* s s)) . It
is the opposite of squaring.
Works only inside sketch functions?
No
Original Processing method
sqrt()