-
Notifications
You must be signed in to change notification settings - Fork 3
FormulaEngine Concepts Functions
Beyond the four standard arithmetic operations, FormulaEngine allows any formula to invoke a number of functions. Just like their algebraic counterparts, FormulaEngine functions take some number of inputs and produce an output value. Typically functions are added to a formula when some operation cannot be expressed succinctly in arithmetic terms. Functions also have other uses for processing data within a formula.
Returns 1.0 if x lies on the interval [a,b] and 0.0 otherwise.
Returns the Euclidean distance between points p1 and p2 - note that only points are supported as of this writing.
Returns 1.0 if a and b are identical values and 0.0 otherwise. If a and b are of different types, always returns 0.0.
Returns 1.0 if t1 and t2 are both tokens that refer to "suitably similar" text strings. Useful for approximately matching text entered by the user to design-time text; see FormulaMUD for example usage.
Returns 1.0 if a and b are scalars, and a is less than b. Returns 0.0 otherwise.
Returns a vector of the same direction as v but limited to magnitude m. If v is of lesser magnitude than m, returns v unmodified.
Returns the normalized form of the input vector v.
Returns a uniformly distributed random number on the interval [0, x).
Returns x rounded to the nearest integer.
Given a list of scalars l, returns the sum of each element in the list.
Converts the scalars x and y into an internal vector type with the same component values.