Code Model
Business Units
Expressions
Mathematical Operations

Mathematical Operations

Min

Represents finding the minimum value.

{
    "ExpressionType": "Min"
}

Max

Represents finding the maximum value.

{
    "ExpressionType": "Max"
}

Average

Represents calculating the average.

{
   "ExpressionType": "Average",
   "Values": [
       {
           "ExpressionType": "Constant",
           "DataType": "Int32",
           "Value": 1000,
       },
       {
           "ExpressionType": "Constant",
           "DataType": "Int32",
           "Value": 2000,
       }
   ]
}

Sum

Represents calculating the sum.

{
    "ExpressionType": "Sum",
    "Values": [
         {
            "ExpressionType": "Constant",
            "DataType": "Int32",
            "Value": 1000,
        },
        {
            "ExpressionType": "Constant",
            "DataType": "Int32",
            "Value": 2000,
        }
    ]
}

Substract

Represents subtracting values.

{
    "ExpressionType": "Substract",
    "Values": [
        {
            "ExpressionType": "Constant",
            "DataType": "Int32",
            "Value": 1000,
        },
        {
            "ExpressionType": "Constant",
            "DataType": "Int32",
            "Value": 2000,
        }
    ]
}

Multiplication

Represents multiplying values.

{
    "ExpressionType": "Multiplication",
    "Values": [
        {
            "ExpressionType": "Constant",
            "DataType": "Int32",
            "Value": 10,
        },
        {
            "ExpressionType": "Constant",
            "DataType": "Int32",
            "Value": 20,
        }
    ]
}

Division

Represents dividing values.

{
    "ExpressionType": "Division",
    "Divident": {
        "ExpressionType": "Constant",
        "DataType": "Int32",
        "Value": 20,
    },
    "Divisor":{
        "ExpressionType": "Constant",
        "DataType": "Int32",
        "Value": 10,
     }
}

Remainder

Represents calculating the remainder of two number.

{
    "ExpressionType": "Remainder",
    "Divident": {
        "ExpressionType": "Constant",
        "DataType": "Int32",
        "Value": 7,
    },
    "Divisor":{
        "ExpressionType": "Constant",
        "DataType": "Int32",
        "Value": 3,
    }
}

Round

Represents calculating the round of number.

{
    "ExpressionType": "Round",
    "NumberOfDecimals":  {
        "ExpressionType": "Constant",
        "DataType": "Decimal",
        "Value": 3.24,
    },
    "Mode": "ToZero" ("ToZero", "ToEven", "AwayFromZero")      
}

Ceiling

Represents calculating the ceiling of number.

{
    "ExpressionType": "Ceiling",
    "Value":  {
        "ExpressionType": "Constant",
        "DataType": "Decimal",
        "Value": 3.24,
    }
}

Power

Represents calculating the power of number.

{
    "ExpressionType": "Power",
    "Value":  {
        "ExpressionType": "Constant",
        "DataType": "Int32",
        "Value": 3,
    },
    "Power":  {
        "ExpressionType": "Constant",
        "DataType": "Int32",
        "Value": 2,
    }
}

Floor

Represents calculating the floor of decimal number.

{
    "ExpressionType": "Floor",
    "Value":  {
        "ExpressionType": "Constant",
        "DataType": "Decimal",
        "Value": 3.245,
    }
}