# API Docs - Modern Large Numbers

A simple API to create, add, and subtract large numbers up to 999.9 Quadragintillion, or 10^123 decimal places.

# modern-large-numbers
A simple API to create, add, and subtract large numbers up to 999.9 Quadragintillion, or 10^123 decimal places.

------

### Setup for Unity 2021.3+

Import the `ModernProgramming` namespace into your project file to start using Modern Large Numbers.

------

### Public Enums

`LargeNumber.Suffixes` - Names for all large numbers.

------

### Public Methods

#### Creating a new Large Number

`LargeNumber()` - Creates a new large number with default value of zero.

`LargeNumber(int newNumber)` - Creates a new large number clamped between 0 and 999.

`LargeNumber(int newNumber, int newSegments)` - Creates a new large number with up to forty-two 3 digit segments (10^123)

------

#### Basic Math Operations

`LargeNumber.SubtractOne()` - Subtract one from the large number.

`LargeNumber.SubtractLargeNumber(LargeNumber numberToSubtract)` - Subtracts a large number from this large number.

`LargeNumber.MultiplyLargeNumber(LargeNumber numberA, LargeNumber numberB)` - (LargeNumber) Multiplies two large numbers together.

------

#### Equality Checks

`LargeNumber.IsGreaterThan(LargeNumber numberToCompare)` - (bool) Checks if a large number is greater than this large number.

`LargeNumber.IsLessThan(LargeNumber numberToCompare)` - (bool) Checks if a large number is less than this large number.

`LargeNumber.IsEqual(LargeNumber numberToCompare)` - (bool) Checks if a large number is equal to this large number.

------

#### Utility Methods

`LargeNumber.Assign(LargeNumber numberToAssign)` - Assign a large number to this variable.

`LargeNumber.LargeNumberToShortString()` - (string) Converts this large number into a string with a suffix.

`LargeNumber.LargeNumberToString()` - (string) Converts this large number into a string.

`LargeNumber.StringToLargeNumber(string stringToConvert)` - (LargeNumber) Converts this string into a large number.

`LargeNumber.ClampList()` - Clamps the number list.

------

### TO-DO

- Test engine backwards compatability.
- Test math operations past 123 digits.
- Implement division.
- Implement float decimal math.