This page is a work in progress and may not have the polish of a usual Evie-Written document!
Some quick docs:
// Assumingpoints.set("number", 42);points.set("numberInObject", {sub: { anInt: 5 }});points.math("number", "/", 2); // 21points.math("number", "add", 5); // 26points.math("number", "modulo", 3); // 2points.math("numberInObject", "+", 10, "sub.anInt");
Possible Operators (accepts all variations listed below, as strings):
+
, add
, addition
: Increments the value in the enmap by the provided value.
-
, sub
, subtract
: Decrements the value in the enmap by the provided value.
*
, mult
, multiply
: Multiply the value in the enmap by the provided value.
/
, div
, divide
: Divide the value in the enmap by the provided value.
%
, mod
, modulo
: Gets the modulo of the value in the enmap by the provided value.
^
, exp
, exponential
: Raises the value in the enmap by the power of the provided value.
// Assumingpoints.set("number", 42);points.set("numberInObject", {sub: { anInt: 5 }});points.inc("number"); // 43points.inc("numberInObject", "sub.anInt"); // {sub: { anInt: 6 }}
// Assumingpoints.set("number", 42);points.set("numberInObject", {sub: { anInt: 5 }});points.dec("number"); // 41points.dec("numberInObject", "sub.anInt"); // {sub: { anInt: 4 }}