Static Public Methods | |
| int[] | toDigits (final String val) |
| int | add (final int val) |
| int[] | toDigits (final int val) |
Definition at line 10 of file Utils.java.
|
|
This add method does not return the sum of two numbers (ie 2 + 2 = 4) in the traditional sense. Instead it sums the digits in a single number and returns that result. If the result is greater than or equal to 10 the digits are sumed again and again until the addition results in a number less than 10. For example, if you pass add the number 51 the return value will be 6, (5 + 1 = 6). However, if you pass in the number 55 the return value will be 1, (5 + 5 = 10, 1 + 0 = 1).
Definition at line 44 of file Utils.java. |
|
|
Definition at line 59 of file Utils.java. References sosc::Utils::toDigits(). |
|
|
The toDigits method is used to convert a String into an array of integers.
Definition at line 19 of file Utils.java. Referenced by sosc::Utils::toDigits(). |
1.2.15