Skip to content

Math

Basic math operations: abs, ceil, floor, power, round.

5 modules

ModuleDescription
Wartosc bezwzglednaPobierz wartosc bezwzgledna liczby
Sufit liczbyZaokraglij liczbe w gore do najblizszej liczby calkowitej
Podloga liczbyZaokraglij liczbe w dol do najblizszej liczby calkowitej
Potega/WykladnikPodnies liczbe do potegi
Zaokraglij liczbeZaokraglij liczbe do okreslonej liczby miejsc dziesietnych

Modules

Wartosc bezwzgledna

math.abs

Pobierz wartosc bezwzgledna liczby

Parameters:

NameTypeRequiredDefaultDescription
numbernumberYes-Number to process

Output:

FieldTypeDescription
resultnumberWartosc bezwzgledna
originalnumberWartosc bezwzgledna

Example: Absolute of negative number

yaml
number: -5

Example: Absolute of positive number

yaml
number: 3.14

Sufit liczby

math.ceil

Zaokraglij liczbe w gore do najblizszej liczby calkowitej

Parameters:

NameTypeRequiredDefaultDescription
numbernumberYes-Number to process

Output:

FieldTypeDescription
resultnumberWartosc sufitu
originalnumberWartosc sufitu

Example: Ceiling positive number

yaml
number: 3.2

Example: Ceiling negative number

yaml
number: -2.7

Podloga liczby

math.floor

Zaokraglij liczbe w dol do najblizszej liczby calkowitej

Parameters:

NameTypeRequiredDefaultDescription
numbernumberYes-Number to process

Output:

FieldTypeDescription
resultnumberWartosc podlogi
originalnumberWartosc podlogi

Example: Floor positive number

yaml
number: 3.7

Example: Floor negative number

yaml
number: -2.3

Potega/Wykladnik

math.power

Podnies liczbe do potegi

Parameters:

NameTypeRequiredDefaultDescription
basenumberYes-Base number
exponentnumberYes-Power to raise to

Output:

FieldTypeDescription
resultnumberWynik podniesienia podstawy do wykladnika
basenumberWynik podniesienia podstawy do wykladnika
exponentnumberWynik podniesienia podstawy do wykladnika

Example: Square a number

yaml
base: 5
exponent: 2

Example: Cube root

yaml
base: 27
exponent: 0.333333

Zaokraglij liczbe

math.round

Zaokraglij liczbe do okreslonej liczby miejsc dziesietnych

Parameters:

NameTypeRequiredDefaultDescription
numbernumberYes-Number to process
decimalsnumberNo0Number of decimal places

Output:

FieldTypeDescription
resultnumberZaokraglona wartosc
originalnumberZaokraglona wartosc
decimalsnumberZaokraglona wartosc

Example: Round to integer

yaml
number: 3.7

Example: Round to 2 decimal places

yaml
number: 3.14159
decimals: 2

Released under the Apache 2.0 License.