private fun getDigit(number: Int, nth: Int): Int

Gets the nth digit of a number, starting from the right

Return

The digit at the nth index

Parameters

number

The number to get the digit from

nth

The index of the digit to get