Skip to main content

Math functions

  • {+}: Adds numbers together

    • Arguments:
      • ...values
    • Example result: 2
      • Using input: {+;1; 1}
      • Using input: {+;1;0.2;0.5;0.3}
  • {-}: Subtracts one or multiple numbers from another

    • Arguments:
      • startValue
      • ...values
    • Example result: 0
      • Using input: {-;1;1}
  • {*}: Multiplies two numbers

    • Arguments:
      • value1
      • value2
    • Example result: 4
      • Using input: {*;2;2}
  • {/}: Divides one number by another

    • Arguments:
      • value1
      • value2
    • Example result: 1
      • Using input: {/;2;2}
  • {%}: Returns the remainder after division (mod)

    • Arguments:
      • value1
      • value2
    • Example result: 0
      • Using input: {%;2;2}
  • {**}: Raises a number to the power of another

    • Arguments:
      • value1
      • value2
    • Example result: 4
      • Using input: {**;2;2}
  • {round}: Rounds a number to the given amount of decimals

    • Arguments:
      • value = 1
      • decimals = 0
    • Example result: 1.00
      • Using input: {round;1;2}
  • {formatBytes}: Converts a bytes value to a human-readable format

    • Arguments:
      • value = 1
      • decimals = 2
    • Example result: 0 bytes
      • Using input: {formatBytes;0}
    • Example result: 1 KiB
      • Using input: {formatBytes;1024}
    • Example result: 1 MiB
      • Using input: {formatBytes;1048576;0}
    • Example result: 53.977 MiB
      • Using input: {formatBytes;56598464;3}
  • {formatNumber}: Converts a number into a more human-readable format

    • Arguments:
      • value = 1
      • langCode = "en-US"
    • Example result: 1.234.567,89
      • Using input: {formatNumber;1234567.89;de-DE}
  • {random}: Generates a random number

    • Arguments:
      • min = 0
      • max = 1
    • Example result: 1
      • Using input: {random;1;1}