Add prestige graph

This commit is contained in:
2026-05-06 23:37:52 +02:00
parent af62e379ee
commit 1ccb498947
32 changed files with 1537 additions and 279 deletions

View File

@@ -195,6 +195,16 @@ func get_ratio(target: BigNumber) -> float:
static func from_float(val: float) -> BigNumber:
return BigNumber.new(val, 0)
## Converts this BigNumber to a standard float. Returns INF or 0.0 for extreme values.
func to_float() -> float:
if mantissa <= 0.0:
return 0.0
if exponent > 308:
return INF
if exponent < -308:
return 0.0
return mantissa * pow(10.0, float(exponent))
## Outputs a UI-friendly string (e.g., "1.50e12")
func to_string_sci(decimals: int = 2) -> String:
if exponent < 3: