# Aru’s Dice Notation

## Syntax

### Numbers

`1` is an Integer and `1.0` is a Decimal.

• Dice rolling accepts only integers.
• Any operation between two integers return an integer, otherwise it returns a decimal.
• Use `integer(number)` to convert a number to an integer and `decimal(number)` to convert to a decimal.

### Dice rolling

• `dY`: Rolls a single die of Y size.
• `XdY`: Rolls X dice of Y size. `4d6` rolls 4 six-sided dice.

### Math

• `A+B`: Addition.
• `A-B`: Subtraction.
• `A*B`: Multiplication.
• `A/B`: Division.
• `A%B`: Remainder of the Division.
• `A^B`: Power of `B`.
• `-A`: Negate a Number.

(You can use parethensis to rule out the mathematical order.)

## Constants and Functions

### Constants

• `pi`: The PI constant.
• `e`: The Euler’s Number constant.
• `r`: Returns a random number, ranging from (0.0) to (1.0), that changes everytime it’s used.

### Functions

• `integer(number)`: Converts a number to an integer.
• `double(number)`: Converts a number to a decimal.
• `sin(number)`: Returns the sine of a number.
• `cos(number)`: Returns the cossine of a number.
• `tan(number)`: Returns the tangent of a number.
• `random(number)`: Same as running a dice with the `number` being the sides of the dice.
• `any(numbers...)`: Returns a random number of all numbers given.