public class PowerMath
extends java.lang.Object
| Constructor and Description |
|---|
PowerMath() |
| Modifier and Type | Method and Description |
|---|---|
static int |
factorial(int number)
Calculate the factorial of a number
Example: 5! = 5 * 4 * 3 * 2 * 1
|
static java.math.BigInteger[] |
fibonacci(int amount)
Calculate a fibonacci sequence to the nth number
|
static int |
getLargest(int... numbers)
Retrieve the largest number from an array
|
static int |
getSmallest(int... numbers)
Retrieve the smallest number from an array
|
public static java.math.BigInteger[] fibonacci(int amount)
amount - amount of digits to calculatepublic static int factorial(int number)
number - factorial indexpublic static int getSmallest(int... numbers)
numbers - input numberspublic static int getLargest(int... numbers)
numbers - input numbers