For AI agents: the complete documentation index is available at /infinity-value/en/llms.txt, the full documentation bundle is available at /infinity-value/en/llms-full.txt, and this page is available as Markdown at /infinity-value/en/api/index.md.

API Reference

Main Types

TypePurpose
InfinityValueLarge-number value type.
InfinityValueUnitNamesInstance-owned unit suffix table for parsing and display.
InfinityValueConverterOptional Newtonsoft.Json converter.
SerializableInfinityValueSerialization wrapper for exposing InfinityValue in the Unity Inspector (details).

Constructors

new InfinityValue(long number)
new InfinityValue(long number, InfinityValueUnitNames unitNames)

new InfinityValue(double number)
new InfinityValue(double number, InfinityValueUnitNames unitNames)

new InfinityValue(float number)
new InfinityValue(float number, InfinityValueUnitNames unitNames)

new InfinityValue(BigInteger number)
new InfinityValue(BigInteger number, InfinityValueUnitNames unitNames)

new InfinityValue(string input)
new InfinityValue(string input, InfinityValueUnitNames unitNames)

Static Values

InfinityValue.Zero
InfinityValue.One

Use WithUnitNames when a zero or one value should carry a custom unit context:

InfinityValue zeroGold = InfinityValue.Zero.WithUnitNames(goldUnits);

Parsing

InfinityValue.TryParse(string input, out InfinityValue result)
InfinityValue.TryParse(string input, InfinityValueUnitNames unitNames, out InfinityValue result)

Instance Members

bool IsEmpty { get; }
InfinityValueUnitNames UnitNames { get; }
InfinityValue WithUnitNames(InfinityValueUnitNames unitNames)
string ToString()
int CompareTo(InfinityValue other)
bool Equals(InfinityValue other)
int GetHashCode()

Operators

a + b
a - b
a * 10L
a * 1.5
a / 2L
a / 2.0

a == b
a != b
a < b
a > b
a <= b
a >= b

Conversions

InfinityValue value = 1000;
InfinityValue parsed = "500A";

long asLong = (long)value;
double asDouble = (double)value;
float asFloat = (float)value;

See Also