Skip to content

Math

Calculations, measurements, and unit conversion.

import Math;

calculate

Performs a number operation on the input and returns the result.

calculate(WFInput: Number, WFMathOperation: Text, WFScientificMathOperation: Text, WFMathOperand: Number, WFScientificMathOperand: Number) -> Number
ParameterTypeDefault
WFInputNumber
WFMathOperationText"+"
WFScientificMathOperationText
WFMathOperandNumber
WFScientificMathOperandNumber

Shortcuts action: is.workflow.actions.math

calculateExpression

Evaluates the mathematical expression in the given input text and outputs the result as a number.

Example expressions:

7 + 7

8 * sqrt(5)

$8 USD in euros

7 feet in meters

calculateExpression(Input: Text) -> Number
ParameterTypeDefault
InputText

Shortcuts action: is.workflow.actions.calculateexpression

calculateStatistics

Calculates statistics on the numbers that are provided as input.

calculateStatistics(WFStatisticsOperation: Text, Input: Any) -> Number
ParameterTypeDefault
WFStatisticsOperationText"Average"
InputAny

Shortcuts action: is.workflow.actions.statistics

convertMeasurement

Converts the measurements passed into the action to the specified unit.

convertMeasurement(WFMeasurementUnitType: Text, WFMeasurementUnit: Text, WFInput: Any) -> Number
ParameterTypeDefault
WFMeasurementUnitTypeText"Length"
WFMeasurementUnitText
WFInputAny

Shortcuts action: is.workflow.actions.measurement.convert

measurement

Passes the specified measurement (including number and unit) to the next action.

measurement(WFMeasurementUnitType: Text, WFMeasurementUnit: Number) -> Number
ParameterTypeDefault
WFMeasurementUnitTypeText"Length"
WFMeasurementUnitNumber

Shortcuts action: is.workflow.actions.measurement.create

number

Passes a number to the next action.

number(WFNumberActionNumber: Number) -> Number
ParameterTypeDefault
WFNumberActionNumberNumber

Shortcuts action: is.workflow.actions.number

randomNumber

Passes a random number between the given minimum and maximum to the next action. The minimum and maximum numbers are included as possible results.

randomNumber(WFRandomNumberMinimum: Number, WFRandomNumberMaximum: Number) -> Number
ParameterTypeDefault
WFRandomNumberMinimumNumber
WFRandomNumberMaximumNumber

Shortcuts action: is.workflow.actions.number.random

roundNumber

Rounds the number(s) passed into the action.

roundNumber(WFInput: Number, WFRoundTo: Text, WFRoundMode: Text, TenToThePowerOf: Number) -> Number
ParameterTypeDefault
WFInputNumber
WFRoundToText"Ones Place"
WFRoundModeText"Normal"
TenToThePowerOfNumber0

Shortcuts action: is.workflow.actions.round