diff --git a/docs/instructions/arithmetic/absolute.md b/docs/instructions/arithmetic/absolute.md new file mode 100644 index 0000000..b9571f6 --- /dev/null +++ b/docs/instructions/arithmetic/absolute.md @@ -0,0 +1,32 @@ +# abs + +Returns the absolute value of a number. + +## Parameters + +* value (`integer`, `float`, `double`) - The number to get the absolute value of. + +## Return + +(`integer`, `float`, `double`) - The result of the absolute value. + +## Exceptions + +* `EvaluationException` - If there was an error while evaluating one or more parameters. +* `TypeException` - If one or more parameters are not of the expected type. + +## Instruction Example + +```json +{ + "type": "abs", + "_": { + "value": 10 + } +} +``` + +### Last Updated + +Monday, December 30th, 2022. +Written by [Netkas](https://git.n64.cc/netkas) \ No newline at end of file diff --git a/docs/instructions/divide.md b/docs/instructions/arithmetic/divide.md similarity index 69% rename from docs/instructions/divide.md rename to docs/instructions/arithmetic/divide.md index e533230..0052dd0 100644 --- a/docs/instructions/divide.md +++ b/docs/instructions/arithmetic/divide.md @@ -1,11 +1,11 @@ -# divide +# div Divide two numbers. ## Parameters -* a (`integer`, `float`, `double`, `instruction`) - The number to divide. -* b (`integer`, `float`, `double`, `instruction`) - The number to divide by. +* a (`integer`, `float`, `double`) - The number to divide. +* b (`integer`, `float`, `double`) - The number to divide by. ## Return @@ -21,7 +21,7 @@ Divide two numbers. ```json { - "type": "divide", + "type": "div", "_": { "a": 10, "b": 2 @@ -31,5 +31,5 @@ Divide two numbers. ### Last Updated -Monday, December 26th, 2022. +Monday, December 30th, 2022. Written by [Netkas](https://git.n64.cc/netkas) \ No newline at end of file diff --git a/docs/instructions/arithmetic/floor.md b/docs/instructions/arithmetic/floor.md new file mode 100644 index 0000000..96fa6a9 --- /dev/null +++ b/docs/instructions/arithmetic/floor.md @@ -0,0 +1,32 @@ +# floor + +Returns the floor value of a number. + +## Parameters + +* value (`integer`, `float`, `double`) - The number to get the floor value of. + +## Return + +(`integer`, `float`, `double`) - The result of the floor value. + +## Exceptions + +* `EvaluationException` - If there was an error while evaluating one or more parameters. +* `TypeException` - If one or more parameters are not of the expected type. + +## Instruction Example + +```json +{ + "type": "floor", + "_": { + "value": 10.5 + } +} +``` + +### Last Updated + +Monday, December 30th, 2022. +Written by [Netkas](https://git.n64.cc/netkas) \ No newline at end of file diff --git a/docs/instructions/arithmetic/modulo.md b/docs/instructions/arithmetic/modulo.md new file mode 100644 index 0000000..f93c131 --- /dev/null +++ b/docs/instructions/arithmetic/modulo.md @@ -0,0 +1,34 @@ +# mod + +Calculates the remainder of a division operation. + +## Parameters + +* a (`integer`, `float`, `double`) - The number to divide. +* b (`integer`, `float`, `double`) - The number to divide by. + +## Return + +(`integer`, `float`, `double`) - The result of the modulo operation. + +## Exceptions + +* `EvaluationException` - If there was an error while evaluating one or more parameters. +* `TypeException` - If one or more parameters are not of the expected type. + +## Instruction Example + +```json +{ + "type": "mod", + "_": { + "a": 10, + "b": 3 + } +} +``` + +### Last Updated + +Monday, December 30th, 2022. +Written by [Netkas](https://git.n64.cc/netkas) \ No newline at end of file diff --git a/docs/instructions/arithmetic/multiply.md b/docs/instructions/arithmetic/multiply.md new file mode 100644 index 0000000..e3421c6 --- /dev/null +++ b/docs/instructions/arithmetic/multiply.md @@ -0,0 +1,34 @@ +# mul + +Calculates the multiplication of two numbers. + +## Parameters + +* a (`integer`, `float`, `double`) - The number to multiply. +* b (`integer`, `float`, `double`) - The number to multiply by. + +## Return + +(`integer`, `float`, `double`) - The result of the multiplication. + +## Exceptions + +* `EvaluationException` - If there was an error while evaluating one or more parameters. +* `TypeException` - If one or more parameters are not of the expected type. + +## Instruction Example + +```json +{ + "type": "mul", + "_": { + "a": 10, + "b": 3 + } +} +``` + +### Last Updated + +Monday, December 30th, 2022. +Written by [Netkas](https://git.n64.cc/netkas) \ No newline at end of file diff --git a/docs/instructions/arithmetic/power.md b/docs/instructions/arithmetic/power.md new file mode 100644 index 0000000..bf5ef7e --- /dev/null +++ b/docs/instructions/arithmetic/power.md @@ -0,0 +1,34 @@ +# pow + +Calculates the power of a number. + +## Parameters + +* a (`integer`, `float`, `double`) - The number to raise to a power. +* b (`integer`, `float`, `double`) - The power to raise the number to. + +## Return + +(`integer`, `float`, `double`) - The result of the power calculation. + +## Exceptions + +* `EvaluationException` - If there was an error while evaluating one or more parameters. +* `TypeException` - If one or more parameters are not of the expected type. + +## Instruction Example + +```json +{ + "type": "pow", + "_": { + "a": 2, + "b": 3 + } +} +``` + +### Last Updated + +Monday, December 30th, 2022. +Written by [Netkas](https://git.n64.cc/netkas) \ No newline at end of file diff --git a/docs/instructions/arithmetic/round.md b/docs/instructions/arithmetic/round.md new file mode 100644 index 0000000..532a496 --- /dev/null +++ b/docs/instructions/arithmetic/round.md @@ -0,0 +1,33 @@ +# round + +Rounds a number to a given precision. + +## Parameters + +* value (`integer`, `float`, `double`) - The number to round. +* precision (`integer`) - The number of decimal places to round to. (default: 0) + +## Return + +(`integer`, `float`, `double`) - The result of the rounding. + +## Exceptions + +* `EvaluationException` - If there was an error while evaluating one or more parameters. +* `TypeException` - If one or more parameters are not of the expected type. + +## Instruction Example + +```json +{ + "type": "abs", + "_": { + "value": 10 + } +} +``` + +### Last Updated + +Monday, December 30th, 2022. +Written by [Netkas](https://git.n64.cc/netkas) \ No newline at end of file diff --git a/docs/instructions/arithmetic/square_root.md b/docs/instructions/arithmetic/square_root.md new file mode 100644 index 0000000..e30e254 --- /dev/null +++ b/docs/instructions/arithmetic/square_root.md @@ -0,0 +1,32 @@ +# square_root + +Calculates the square root of a number. + +## Parameters + +* value (`integer`, `float`, `double`) - The number to calculate the square root of. + +## Return + +(`integer`, `float`, `double`) - The result of the square root calculation. + +## Exceptions + +* `EvaluationException` - If there was an error while evaluating one or more parameters. +* `TypeException` - If one or more parameters are not of the expected type. + +## Instruction Example + +```json +{ + "type": "square_root", + "_": { + "value": 4 + } +} +``` + +### Last Updated + +Monday, December 30th, 2022. +Written by [Netkas](https://git.n64.cc/netkas) \ No newline at end of file diff --git a/docs/instructions/arithmetic/subtract.md b/docs/instructions/arithmetic/subtract.md new file mode 100644 index 0000000..7eb7588 --- /dev/null +++ b/docs/instructions/arithmetic/subtract.md @@ -0,0 +1,34 @@ +# sub + +Subtract two numbers. + +## Parameters + +* a (`integer`, `float`, `double`) - The number to subtract from. +* b (`integer`, `float`, `double`) - The number to subtract. + +## Return + +(`integer`, `float`, `double`) - The result of the subtraction. + +## Exceptions + +* `EvaluationException` - If there was an error while evaluating one or more parameters. +* `TypeException` - If one or more parameters are not of the expected type. + +## Instruction Example + +```json +{ + "type": "sub", + "_": { + "a": 10, + "b": 2 + } +} +``` + +### Last Updated + +Monday, December 30th, 2022. +Written by [Netkas](https://git.n64.cc/netkas) \ No newline at end of file diff --git a/docs/instructions/arithmetic/sum.md b/docs/instructions/arithmetic/sum.md new file mode 100644 index 0000000..510563d --- /dev/null +++ b/docs/instructions/arithmetic/sum.md @@ -0,0 +1,34 @@ +# sum + +Calculates the sum of two numbers. + +## Parameters + +* a (`integer`, `float`, `double`) - The first number to add. +* b (`integer`, `float`, `double`) - The second number to add. + +## Return + +(`integer`, `float`, `double`) - The result of the addition. + +## Exceptions + +* `EvaluationException` - If there was an error while evaluating one or more parameters. +* `TypeException` - If one or more parameters are not of the expected type. + +## Instruction Example + +```json +{ + "type": "sum", + "_": { + "a": 10, + "b": 2 + } +} +``` + +### Last Updated + +Monday, December 30th, 2022. +Written by [Netkas](https://git.n64.cc/netkas) \ No newline at end of file