ProcessMIX Guide
Ask or search…
K

Expression editor

Editor for ProcessMIX is a tool that enables the creation and editing of expressions at runtime, which can then be used to perform calculations and manipulate data. The Expression Editor offers smart code completion, syntax highlighting, and error-reporting functionalities.

How to work with the Expression editor?

The Expression Editor becomes available whenever you need to define a parameter as an expression within a node.
When you're working with the Assign node, you can set an expression for the assignment, or when dealing with the If or Switch node, you can specify a condition and open the Expression Editor by clicking on the input field.
After the click, the Expression Editor pop-up window will open.
In the left panel, you can find all the data that can be used in an expression for the selected node — inputs, output, nodes variables, global and local variables. Each variable has a name, a type, and the indicator of the node that generated this variable.
You can filter the variables to find the necessary data. Click on the search field where you can enter the name of the element you need to find.
Click on the required data item or variable to add it to the expression.
There is a functions tree at the bottom of the Expression editor window. Different types of functions are available. There are casting functions to convert primitive types, mathematical functions, functions on maps, array, date, and strings.
Click on the required function to add it to the expression.
Click on a function name to see its description on the right, or double-click to add the selected function to the expression.
Auto-completion is also available in the process of writing an expression. The possible options for auto-completion will be displayed. Selection of one of them can be done using the arrows and the enter key or by clicking on the expression.

Available functions:

1. Any

Description:
Additional:
toString
Converts any value to string
Arguments:
Any — any value.
Result: String — converted value.
clone
Clones any object
Arguments:
Any — any value.
Result: String — cloned object.

2. Util

Description:
Additional:
uuid
Static factory to retrieve a type 4 (pseudo randomly generated) UUID. The UUID is generated using a cryptographically strong pseudo random number generator.
Result: String — A randomly generated 36 characters long UUID.

3. Json

Description:
Additional:
asBoolean New 5.0.5 release
Converts the JSON object to a boolean value.
Arguments:
JsonObject - the json object
Result: Boolean - the input JSON object converted to a boolean value.
asFloat New 5.0.5 release
Converts the JSON object to a float value.
Arguments:
JsonObject - the json object
Result: Float - the input JSON object converted to a float value.
asInteger New 5.0.5 release
Converts the JSON object to an integer value.
Arguments:
JsonObject - the json object
Result: Integer - the input JSON object converted to an integer value.
asText New 5.0.5 release
Converts the JSON object to a string value.
Arguments:
JsonObject - the json object
Result: String - the input JSON object converted to a string value.
at New 5.0.5 release
Gets a JSON object at the specified path.
Arguments:
JsonObject - the json object
String - the path
Result: JsonObject - the JSON object at the specified path.
canConvertToInteger New 5.0.5 release
Checks if the JSON object can be converted to an integer value.
Arguments:
JsonObject - the json object
Result: Boolean - true if the JSON object can be converted to an integer value.
isNumber New 5.0.5 release
Checks if the JSON object is a number.
Arguments:
JsonObject - the json object
Result: Boolean - true if the JSON object is a number.
elements New 5.0.5 release
Method for accessing all value nodes of this JSON object, if this node is a JSON Array or Object node.
Arguments:
JsonObject - the json object
Result: Array<JsonObject> - an array of the elements of the JSON object.
fields New 5.0.5 release
Method for accessing all field names (keys) and field values.
Arguments:
JsonObject - the json object
Result: Map<JsonObject> - a map of the field names and field values.
findParent New 5.0.5 release
Method for finding a JSON Object that contains specified field, within this node or its descendants.
Arguments:
JsonObject - the json object
String - the field name
Result: JsonObject - the parent of the JSON object.
findParents New 5.0.5 release
Method for finding all JSON Objects that contain specified field, within this node or its descendants.
Arguments:
JsonObject - the json object
String - the field name
Result: Array<JsonObject> - an array of the parents of the JSON object.
findValue New 5.0.5 release
Method for finding a JSON Object field with specified name in this node or its child nodes, and returning value it has.
Arguments:
JsonObject - the json object
String - the field name
Result: JsonObject - the value of the field.
findValues New 5.0.5 release
Method for finding JSON Object fields with specified name in this node or its child nodes, and returning values they have.
Arguments:
JsonObject - the json object
String - the field name
Result: Array<JsonObject> - an array of the values of the fields.
getByIndex New 5.0.5 release
Method for accessing value of the specified element of an JSON array.
Arguments:
JsonArray - the json array
Integer - the index
Result: JsonObject - the JSON object at the specified index.
get New 5.0.5 release
Method for accessing value of the specified field of an JSON object.
Arguments:
JsonObject - the json object
String - the field name
Result: JsonObject - the value of the field.
hasIndex New 5.0.5 release
Method that allows checking whether this object is JSON Array and contains a value for specified index If this is the case (including case of specified indexing having null as value), returns true; otherwise returns false.
Arguments:
JsonArray - the json array
Integer - the index
Result: Boolean - true if the JSON array contains an element with the specified index.
hasNotNullIndex New 5.0.5 release
Method that allows checking whether this object is JSON Array and contains a non-null value for specified index If this is the case, returns true; otherwise returns false.
Arguments:
JsonArray - the json array
Integer - the index
Result: Boolean - true if the JSON array contains a non-null element with the specified index.
has New 5.0.5 release
Method that allows checking whether this object is JSON Object and contains specified field If this is the case (including case of specified field having null as value), returns true; otherwise returns false.
Arguments:
JsonObject — the json object
String — the field name
Result:
boolean — true if the JSON object contains the specified field.
hasNotNull New 5.0.5 release
Method that allows checking whether this object is JSON Object and contains specified field If this is the case, returns true; otherwise returns false.
Arguments:
JsonObject - the json object
String - the field name
Result: Boolean - true if the JSON object contains the specified field.
getType New 5.0.5 release
Gets a type of the JSON object.
Arguments:
JsonObject - the json object
Result: String - the type of the JSON object.
isArray
Checks if the input object is an array.
Arguments: JSONObject — any JSON object.
Result: Boolean — true if the input object is an JSONArray.
isBinary New 5.0.5 release
Method that can be used to check if this object represents binary data (Base64 encoded).
Arguments:
JsonObject - the json object
Result: Boolean - true if the JSON object is a binary value.
isBoolean New 5.0.5 release
Method that can be used to check if this object was created from JSON boolean value (literals "true" and "false").
Arguments:
JsonObject - the json object
Result: Boolean - true if the JSON object is a boolean value.
isContainerNode New 5.0.5 release
Method that can be used to check if this object is a JSON Array or JSON Object.
Arguments:
JsonObject - the json object
Result: Boolean - true if the JSON object is a container node.
isFloat New 5.0.5 release
Method that can be used to check if this object was created from JSON floating-point number value (literals such as "2.25" or "-0.003").
Arguments:
JsonObject - the json object
Result: Boolean - true if the JSON object is a float value.
isInteger New 5.0.5 release
Method that can be used to check if this object was created from JSON integer number value (literals such as "2", "-3" or "0").
Arguments:
JsonObject - the json object
Result: Boolean - true if the JSON object is an integer value.
isIntegralNumber New 5.0.5 release
Method that can be used to check if this object was created from JSON number without any fractional digits (like "2", "-3" or "0")
Arguments:
JsonObject - the json object
Result: Boolean - true if the JSON object is an integral number.
isMissingNode New 5.0.5 release
Method that returns true for "virtual" objects which represent missing entries constructed by path accessor methods when there is no actual node matching given criteria.
Arguments:
JsonObject - the json object
Result: Boolean - true if the JSON object is a missing node.
isNull New 5.0.5 release
Method that can be used to check if this object was created from JSON literal null value.
Arguments:
JsonObject - the json object
Result: Boolean - true if the JSON object is a null value.
isObject New 5.0.5 release
Method that can be used to check if this object is JSON Object.
Arguments:
JsonObject - the json object
Result: Boolean - true if the JSON object is an object node.
isTextual New 5.0.5 release
Method that checks whether this object represents basic JSON String value.
Arguments:
JsonObject - the json object
Result: Boolean - true if the JSON object is a textual value.
isValueNode New 5.0.5 release
Method that returns true for all value nodes: ones that are not containers, and that do not represent "missing" nodes in the path.
Arguments:
JsonObject - the json object
Result: Boolean - true if the JSON object is a value node.
pathByIndex New 5.0.5 release
This method is similar to getByIndex, except that instead of returning null if no such element exists (due to index being out of range, or this node not being an array), a "missing node" (node that returns true for isMissingNode()) will be returned.
Arguments:
JsonArray - the json array
Integer - the index
Result: JsonObject - the JSON object at the specified index.
path New 5.0.5 release
This method is similar to get, except that instead of returning null if no such value exists (due to this node not being an object, or object not having value for the specified field), a "missing node" (node that returns true for isMissingNode()) will be returned.
Arguments:
JsonObject - the json object
String - the field name
Result: JsonObject - the value of the field.
toJsonObject New 5.0.5 release
Converts the input object to a JsonObject.
Arguments:
Any - any object
Result: JsonObject - the input object converted to a JsonObject.
diff New 5.0.5 release
Compares two JsonObjects and returns an array of operations that need to be applied to the first object to make it equal to the second one.
Arguments:
JsonObject - the first json object
JsonObject - the second json object
Result: Array - an array of patch operations.
merge New 5.0.5 release
Merges two JsonObjects and returns a new JsonObject that contain attribute from both objects.
Arguments:
JsonObject - the first json object
JsonObject - the second json object
Result: JsonObject - a new JsonObject.
patch New 5.0.5 release
Applies an array of patch operations to the input json object and returns a new JsonObject.
Arguments:
JsonObject - the json object
Array<JsonOperation> - an array of patch operations
Result: JsonObject - a new JsonObject.
hasAttribute New 5.0.5 release
Checks if the input object has the specified attribute.
Arguments:
JsonObject - any json object
String - attribute name
Result: Boolean - true if the input object has the specified attribute.
isAttributeNotNull New 5.0.5 release
Checks if the input object has the specified attribute and it is not null.
Arguments:
JsonObject - any json object
String - attribute name
Result: Boolean - true if the input object has the specified attribute and it is not null.
isAttributeNotNull New 5.0.5 release
Checks if the input object has the specified attribute and it is not null.
Arguments:
JsonObject - any json object
String - attribute name
Result: Boolean - true if the input object has the specified attribute and it is not null.
objectToArray
Converts the input object to an array.
Arguments: JSONObject— any JSON object.
Result: JSONArray — the input object converted to an array.
getAttributeNames
Gets a list of attribute names of the input object.
Arguments: JSONObject — any JSON object.
Result: Array<String> — list of attribute names.
getInteger
Gets an integer value of the JSONObject attribute.
Arguments: JSONObject — any JSON object. String — attribute name.
Result: Integer — attribute value.
getIntegerArray
Gets an array of integer values of the JSONObject attribute.
Arguments: JSONObject — any JSON object. String — attribute name.
Result: Array<Integer> — attribute value.
getFloat
Gets a float value of the JSONObject attribute.
Arguments: JSONObject — any JSON object. String — attribute name.
Result: Float — attribute value.
getFloatArray
Gets an array of float values of the JSONObject attribute.
Arguments: JSONObject — any JSON object. String — attribute name.
Result: Array<Float> — attribute value.
getBoolean
Gets a boolean value of the JSONObject attribute.
Arguments: JSONObject — any JSON object. String — attribute name.
Result: Boolean — attribute value.
getBooleanArray
Gets an array of boolean values of the JSONObject attribute.
Arguments: JSONObject — any JSON object. String — attribute name.
Result: Array<Boolean> — attribute value.
getString
Gets a string value of the JSONObject attribute.
Arguments: JSONObject — any JSON object. String — attribute name.
Result: String — attribute value.
getStringArray
Gets an array of string values of the JSONObject attribute.
Arguments: JSONObject — any JSON object. String — attribute name.
Result: Array<String> — attribute value.
getJsonObject
Gets a JSONObject value of the JSONObject attribute.
Arguments: JSONObject — any JSON object. String — attribute name.
Result: JSONObject — attribute value.
getJsonArray
Gets an array of JSONObject values of the JSONObject attribute.
Arguments: JSONObject — any JSON object. String — attribute name.
Result: JSONArray — attribute value.
getArraySize
Gets a size of the JSONArray.
Arguments: JSONArray — any JSON array.
Result: Integer — size.
getArrayItem
Gets an element of the JsonArray.
Arguments: JSONArray — any JSON array. Integer — index.
Result: JSONObject — element.

4. Codec

Description:
Additional:
encodeStringToBase64
Encodes a String into a newly—allocated Base64 encoded String.
Arguments: String — the string to encode.
Result: String — a newly—allocated base 64 string.
encodeFileToBase64
Encodes a File into a newly—allocated Base64 encoded String.
Arguments: File — the file to encode.
Result: String — a newly—allocated base 64 string.
decodeBase64ToFile
Decodes a Base64 string into a File.
Arguments: String - а base 64 string to decode.
Result: File - the file representeation of decocded base64 string.
hexStringToIntegerArray
Converts a hex string to an array of integers (each integer represents a byte).
Arguments:
String - hex string.
Result: Array<Integer> - array of integers.
integerArrayToHexString
Converts an array of integers (byte values) to a hex string.
Arguments:
Array<Integer> - array of integers.
Result: String - hex string.
asciiStringToHex
Converts an ASCII string to a hex string.
Arguments:
String - ASCII string
Integer - size of output hex string: can be set to 0 - output hex string will have size that is required for hex representation (double ASCII string length), can be set greater than ASCII string length - output hex string will have trailing zeros up to specified size
Result: String - hex string.
hexStringToAscii
Converts a hex string to an ASCII string.
Arguments: String — hex string.
Result: String — ASCII string.

5. File

Description:
Additional:
getMetaType
Gets a meta type File.
Arguments: File — any file.
Result: String — mime type.
getName
Gets a name of a File.
Arguments: File — any file.
Result: String — file name.
getSize
Gets a size in bytes of a File.
Arguments: File — any file.
Result: Integer — file size in bytes.
toByteArray
Returns a byte array as a sequence of bytes that represents the contents of the File.
Arguments: File — any file.
Result: Array <byte> — an array of bytes.

6. Crypto

Description:
Additional:
encode
Encode the raw string. Generally, a good encoding algorithm applies a SHA-1 or greater hash combined with an 8-byte or greater randomly generated salt.
Arguments: CleanString — any string.
Result: String — encoded input string.
match
Verify the encoded string matches the submitted clean string after it is encoded. Returns true if the strings match, false if they do not. The encoded string itself is never decoded.
Arguments: CleanString — any string. EncodedString — string encoded by pdk.util.Crypto.encode function.
Result: Boolean — true if the clean password, after encoding, matches the encoded string.

7. Cast

Description:
Additional:
booleanToString
Converts boolean to string.
Arguments: Boolean — object for converting.
Result: String — converted value.
dateToString
Converts date to string by using format.
Arguments: Date — object for converting. String — the format of the date represented by the string.
Result: String — converted object.
dateToStringISO New 5.0.5. release
Converts date to string by using ISO format: 2023-10-20T08:24:45−07:00
Arguments: Date — object for converting.
Result: String— converted date.
integerToFloat
Converts integer to float number.
Arguments: Integer — object for converting.
Result: Float — converted value.
integerToString
Converts integer to string.
Arguments: Integer — object for converting.
Result: String — converted value.
integerToDate
Converts integer to the date object.
Arguments: Integer — assume that this argument represents date milliseconds.
Result: Date — converted object.
floatToString
Converts float to string.
Arguments: Float — the number to be converted.
Result: String — converted object.
stringToInteger
Parses the string argument as a signed decimal integer. The characters in the string must all be decimal digits, except that the first character may be an ASCII minus sign '-' to indicate a negative value or an ASCII plus sign '+' to indicate a positive value.
Arguments: String — the string to be converted.
Result: Integer — the value represented by the argument in decimal.
stringToFloat
Returns a Float object holding the float value represented by the argument string.
Arguments: String — the string to be converted.
Result: Float — object holding the value represented by the String argument.
stringToBoolean
Parses the string argument as a boolean. The boolean returned represents the value true if the string argument is not null and is equal, ignoring cases, to the string "true".
Arguments: String — object for converting.
Result: Boolean — converted value.
stringToDateISO New 5.0.5 release
Converts string to date by using ISO format: 2023-10-20T08:24:45−07:00
Arguments: String — object for converting.
Result: Date — converted date.

8. Map

Description:
Additional:
size
Returns the number of key-value mappings in the map.
Arguments: Map<V> — any map.
Result: Integer — the number of key-value mappings in the map.
containsKey
Returns true if the map contains mapping for the specified key. More specifically, returns true if and only if this map contains a mapping for a key k such that (key==null ? k==null : key = k). (There can be at most one mapping of this type.).
Arguments: Map<V> — any map. K — key whose presence in this map is to be tested.
Result: Boolean — true if the map contains a mapping for the specified key.
get
Returns the value to which the specified key is mapped, or null if the map contains no mapping for the key.
Arguments: Map<V> — any map. K — the key whose associated value is to be returned.
Result: V — the value to which the specified key is mapped, or null if the map contains no mapping for the key.
keys
Returns a Set view of the keys contained in the map. The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. If the map is modified while an iteration over the set is in progress (except through the iterator's own remove operation), the results of the iteration will be undefined.
Arguments: Map<V> — any map.
Result: Array<K> — an array view of the keys contained in the map.
values
Returns an array view of the values contained in the map.
Arguments: Map<V> — any map.
Result: Array<V> — an array view of the values contained in the map.
entryArray
Returns an Array view of the mappings contained in the map.
Arguments: Map<V> — any map.
Result: Array<Entry<V>> — an array view of the elements contained in the map.
isEmpty
Returns true if this map contains no key-value mappings.
Arguments: Map<V> — any map.
Result: Boolean

9. Math

Description:
Additional:
absInt
Returns the absolute value of an integer value.
Arguments: Integer — the argument whose absolute value is to be determined.
Result: Integer — the absolute value of the argument.
absFloat
Returns the absolute value of a float value.
Arguments: Float — the argument whose absolute value is to be determined.
Result: Float — the absolute value of the argument.
acos
Returns the arc cosine of a value; the returned angle is in the range 0.0 through pi. Special case:
  1. 1.
    If the argument is NaN or its absolute value is greater than 1, then the result is NaN.
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
Arguments: Float — the value whose arc cosine is to be returned.
Result: Float — the arc cosine of the argument.
asin
Returns the arc sine of a value; the returned angle is in the range -pi/2 through pi/2. Special cases:
  1. 1.
    If the argument is NaN or its absolute value is greater than 1, then the result is NaN.
  2. 2.
    If the argument is zero, then the result is a zero with the same sign as the argument.
Arguments: Float — the value whose arc sine is to be returned.
Result: Float — the arc sine of the argument.
atan
Returns the arc tangent of a value; the returned angle is in the range -pi/2 through pi/2. Special cases:
  1. 1.
    If the argument is NaN, then the result is NaN.
  2. 2.
    If the argument is zero, then the result is a zero with the same sign as the argument.
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
Arguments: Float — the value whose arc tangent is to be returned.
Result: Float — the arc tangent of the argument.
cbrt
Returns the cube root of a float value. For positive finite x, cbrt(-x) == -cbrt(x); that is, the cube root of a negative value is the negative of the cube root of that value's magnitude. Special cases:
  1. 1.
    If the argument is NaN, then the result is NaN.
  2. 2.
    If the argument is infinite, then the result is infinity with the same sign as the argument.
  3. 3.
    If the argument is zero, then the result is a zero with the same sign as the argument.
The computed result must be within 1 ulp of the exact result.
Arguments:
Float — a value.
Result:
Float — the cube root of a.
ceil
Returns the smallest (closest to negative infinity) float value that is greater than or equal to the argument and is equal to a mathematical integer. Special cases:
  1. 1.
    If the argument value is already equal to a mathematical integer, then the result is the same as the argument.
  2. 2.
    If the argument is NaN or an infinity or positive zero or negative zero, then the result is the same as the argument.
  3. 3.
    If the argument value is less than zero but greater than -1.0, then the result is negative zero.
Arguments: Float — a value.
Result: Integer — the smallest (closest to negative infinity) value that is greater than or equal to the argument and is equal to a mathematical integer.
cos
Returns the trigonometric cosine of an angle. Special cases:
  1. 1.
    If the argument is NaN or an infinity, then the result is NaN.
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
Arguments: Float — an angle, in radians.
Result: Float — the cosine of the argument.
cosh
Returns the hyperbolic cosine of x.
Arguments: Float — value for which to find the hyperbolic cosine.
Result: Float — hyperbolic cosine of x.
exp
Returns Euler's number e raised to the power of a float value. Special cases:
  1. 1.
    If the argument is NaN or an infinity, then the result is NaN.
  2. 2.
    If the argument is positive infinity, then the result is positive infinity.
  3. 3.
    If the argument is negative infinity, then the result is positive zero.
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
Arguments: Float — the exponent to raise e to.
Result: Float — the value eFloat, where e is the base of the natural logarithms.
expm1
Compute exp(x) — 1.
Arguments: Float — number to compute shifted exponential.
Result: Float — exp(x) - 1.
floor
Returns the largest (closest to positive infinity) integer value that is less than or equal to the argument. Special cases:
  1. 1.
    If the argument value is already equal to a mathematical integer, then the result is the same as the argument.
  2. 2.
    If the argument is NaN or an infinity or positive zero or negative zero, then the result is the same as the argument.
Arguments: Float — a value.
Result: Float — the largest (closest to positive infinity) floating-point value that is less than or equal to the argument and is equal to a mathematical integer.
factorial
Returns n!. Shorthand for n Factorial, the product of the numbers 1,...,n.
Arguments: Integer — argument.
Result: Integer — n!.
gcd
Gets the greatest common divisor of the absolute value of two numbers, using the 'binary gcd' method which avoids division and modulo operations. See Knuth 4.5.2 algorithm B. This algorithm is due to Josef Stein (1961).
Arguments: Integer — any number. Integer — any number.
Result: Integer — the greatest common divisor, never negative.
hypot
Returns the hypotenuse of a triangle with sides x and y - sqrt(x2 +y2) avoiding intermediate overflow or underflow.
Arguments: Float — the first leg. Float — the second leg.
Result: Float — returns the hypotenuse of a triangle with sides x and y - sqrt(pow(x, 2) + pow(y, 2)).
Icm
Returns the least common multiple of the absolute value of two numbers, using the formula lcm(a,b) = (a / gcd(a,b)) * b.
Arguments: Integer — any number. Integer — any number.
Result: Integer — the least common multiple, never negative.
log
Returns the natural logarithm (base e) of a float value. Special cases:
  1. 1.
    If the argument is NaN or less than zero, then the result is NaN.
  2. 2.
    If the argument is positive infinity, then the result is positive infinity.
  3. 3.
    If the argument is positive zero or negative zero, then the result is negative infinity.
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
Arguments: Float — a value.
Result: Float — the value ln, the natural logarithm.
log10
Returns the base 10 logarithm of a float value. Special cases:
  1. 1.
    If the argument is NaN or less than zero, then the result is NaN.
  2. 2.
    If the argument is positive infinity, then the result is positive infinity.
  3. 3.
    If the argument is positive zero or negative zero, then the result is negative infinity.
  4. 4.
    If the argument is equal to 10n for integer n, then the result is n.
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
Arguments: Float — a value.
Result: Float — the base 10 logarithm.
maxFloat
Returns the greater of two float values. That is, the result is the argument closer to positive infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other negative zero, the result is positive zero.
Arguments: Float — an argument. Float — another argument.
Result: Float — the larger of the arguments.
maxFloatValue
Returns maximum value a Flow can have, (2 - Math.pow(2,-52)) * Math.pow(2,1023).
Result: Float — max possible value.
maxInt
Returns the greater of two integer values. That is, the result is the argument closer to positive infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other negative zero, the result is positive zero.
Arguments: Integer — an argument. Integer — another argument.
Result: Integer — the larger of the arguments.
maxIntegerValue
Returns maximum value an Integer can have, Math.pow(2,63)-1.
Result: Integer — max possible value.
minFloat
Returns the smaller of two float values. That is, the result is the value closer to negative infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other is negative zero, the result is negative zero.
Arguments: Float — an argument. Float — another argument.
Result: Float — the smaller of the arguments.
minFloatValue
Returns minimum value a Flow can have, -(2 - Math.pow(2,-52)) * Math.pow(2,1023).
Result: Float — min possible value.
minInt
Returns the smaller of two integer values. That is, the result is the value closer to negative infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other is negative zero, the result is negative zero.
Arguments: Integer — an argument. Integer — another argument.
Result: Integer — the smaller of the arguments.
minIntegerValue
Returns minimum value an Integer can have, -Math.pow(2,63).
Result: Integer — min possible value.
pow
Returns the value of the first argument raised to the power of the second argument.
Arguments: Integer — the base. Integer — the exponent.
Result: Integer — the result.
random
Returns a double value with a positive sign, greater than or equal to 0.0 and less than 1.0. Returned values are chosen pseudorandomly with (approximately) uniform distribution from that range.
Result: Float — a pseudorandom float greater than or equal to 0.0 and less than 1.0.
round
Returns the closest int to the argument, with ties rounding up. Special cases:
  1. 1.
    If the argument is NaN, the result is 0.
  2. 2.
    If the argument is negative infinity or any value less than or equal to the value of Integer.MIN_VALUE, the result is equal to the value of Integer.MIN_VALUE.
  3. 3.
    If the argument is positive infinity or any value greater than or equal to the value of Integer.MAX_VALUE, the result is equal to the value of Integer.MAX_VALUE.
Arguments: Float — a floating-point value to be rounded to an integer.
Result: Integer — the value of the argument rounded to the nearest integer value.
roundFloat
Rounding mode to round towards nearest neighbor, unless both neighbors are equidistant, in which case round up.
If the discarded fraction is >= 0.5, then rounding up takes place up to a nearest integer; otherwise, rounding down to the nearest integer.
Arguments: Float — a floating-point value to be rounded to an integer.
Result: Integer — the value of the argument rounded to the scale value.
sign
Returns the sign for number x.
Arguments: Number — any number x.
Result: Integer — +1, 0, or -1, depending on the sign of x.
sin
Returns the trigonometric sine of an angle. Special cases:
  1. 1.
    If the argument is NaN or an infinity, then the result is NaN.
  2. 2.
    If the argument is zero, then the result is a zero with the same sign as the argument.
The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic.
Arguments: Float — an angle, in radians.
Result: Float — the sine of the argument.
sinh
Returns the hyperbolic sine.
Arguments: Float — double value for which to find the hyperbolic sine.
Result: Float — hyperbolic sine.
sqrt
Returns the correctly rounded positive square root of a double value. Special cases:
  1. 1.
    If the argument is NaN or less than zero, then the result is NaN.
  2. 2.
    If the argument is positive infinity, then the result is positive infinity.
  3. 3.
    If the argument is positive zero or negative zero, then the result is the same as the argument.
Otherwise, the result is the double value closest to the true mathematical square root of the argument value.
Arguments: Float — a value.
Result: Float — the positive square root of the argument. If the argument is NaN or less than zero, the result is NaN.
tan
Returns the trigonometric tangent of an angle. Special cases:
  1. 1.
    If the argument is NaN or an infinity, then the result is NaN.
  2. 2.