Skip to content

Math

Contains blocks to interact with numbers.

abs_(*, value)

Return the absolute value of the argument.

Parameters:

Name Type Description Default
value Any

A number.

required

ceiling(*, value)

Returns the smallest integer that's greater than or equal to the given number.

Parameters:

Name Type Description Default
value Union[int, float]

A number.

required

create_float(*, value)

Convert a value to a float.

Parameters:

Name Type Description Default
value Any

Any value.

required

create_integer(*, value)

Convert a value to an integer.

Parameters:

Name Type Description Default
value Any

Any value.

required

div(*, value1, value2)

Return the division of two numbers.

Parameters:

Name Type Description Default
value1 Union[int, float]

Left side of the operator.

required
value2 Union[int, float]

Right side of the operator.

required

exp(*, value1, value2)

Returns the value of x to the power of y.

Parameters:

Name Type Description Default
value1 ConstrainedFloatValue

Left side of the operator.

required
value2 ConstrainedFloatValue

Right side of the operator.

required

floor(*, value)

Returns the greatest integer that's less than or equal to the given number.

Parameters:

Name Type Description Default
value Union[int, float]

A number.

required

max_(*, value1, value2)

Return the largest value from two values.

Parameters:

Name Type Description Default
value1 Any

First value.

required
value2 Any

Second value.

required

max_list(*, list)

Return the largest value from a list.

Parameters:

Name Type Description Default
list List[Any]

The list that contains items.

required

min_(*, value1, value2)

Return the smallest value from two items.

Parameters:

Name Type Description Default
value1 Any

First value.

required
value2 Any

Second value.

required

min_list(*, list)

Return the smallest value from a list.

Parameters:

Name Type Description Default
list List[Any]

The list that contains items.

required

mod(*, value1, value2)

Performs a division and then returns the remainder of the division.

Parameters:

Name Type Description Default
value1 Union[int, float]

Left side of the operator.

required
value2 Union[int, float]

Right side of the operator.

required

mul(*, value1, value2)

Return the multiplication of two numbers.

Parameters:

Name Type Description Default
value1 ConstrainedFloatValue

Left side of the operator.

required
value2 ConstrainedFloatValue

Right side of the operator.

required

sqrt(*, value)

Returns the square root of the given number.

Parameters:

Name Type Description Default
value Union[int, float]

A number.

required

sub(*, value1, value2)

Return the subtraction of two numbers.

Parameters:

Name Type Description Default
value1 Union[int, float]

Left side of the operator.

required
value2 Union[int, float]

Right side of the operator.

required

sum_(*, value1, value2)

Return the sum of two numbers.

Parameters:

Name Type Description Default
value1 Union[int, float]

Left side of the operator.

required
value2 Union[int, float]

Right side of the operator.

required

sum_list(*, list, start=0)

Return the sum of a 'start' value (default: 0) plus an list of numbers. When the list is empty, return the start value.

Parameters:

Name Type Description Default
list List[Any]

The list that contains items.

required