Add prestige graph
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user