Fully compatible with GMS:1 and GMS:2
A set of scripts that allows you to store huge non-negative (to be added) numbers accurately in any base (Cookie clicker style games for example). Gamemaker's inbuilt numbers will only extend to a certain amount, with this library you can infinitely add, subtract and multiply integers. You can use any base you like and supply your own alphabet (allows using hexadecimal numbers etc).
Useage: (much, much larger numbers can be used but smaller values are shown for simplicity)
i = "100";
i = add(i, 1); // i == "101"
add("100", -50, "300", "-20") // returns "330"
mult("3148275", 245) // returns "771327375"
bignumber_a_greaterthan_b("100", "1"); // returns true
bignumber_format("1000000", 2); //returns 1.00 million
var a = add("10", "2"), b = mult("6", 2);
if (a == b)
show_message("This message will show!");
math_set_alphabet("0123456789ABCDEF");
math_set_radix(16);
add("8AB", "B7F"); // returns 142A
More Assets:
End User Licence Agreement (EULA).
Added bignumber_format(number[,precision]) to show numbers in a user friendly way (has a dictionary that can be changed). Shows numbers like: 1.00 million, 30.4k, etc etc.