Format a given amount with the decimals.
static int format(double amount, int decimals) { return (amount * (pow(10, decimals))).toInt(); }