1. Math Commands
  2. Calculate

Math Commands

Calculate

Documentation for the calculate command.

Description

The calculate command is used to calculate a math expression.

Command Variations

The calculate command can be used either as slash ( /calculate ) or text ( j!calculate ) command.

NOTE

If you use a different prefix than the default j! prefix, then you should use that prefix.

Usages

        calculate <expression>

      

Examples

        calculate 1+1
calculate 2 inch to cm
calculate 90 km/h to m/s
calculate cos(45 deg)
calculate a=2; b=3; a + b
calculate [[0,1],[1,0]] + [[0,1],[1,0]]
calculate 2i * 2i
calculate 4 mm * 4 mm

      

Restraints

Your expression must not be shorter than 1 character.

Your expression must not be longer than 1000 characters.

Your expression must not take too long to calculate.

Your expression must not contain weird characters.

Your expression must be a valid mathematical function.

You can for example calculate 1 + 1.

Arguments

Argument Type Description Required Default
expression String The expression to evaluate. Yes N/A

Aliases

  • none

Previous <- Purge