Large Numbers

by ThanatosxD
A simple lib that accurately does math for larger and smaller numbers, with decimals or without, negative or positive, and never reaches infinity. [More]
To download this library for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://ThanatosxD.LargeNumbers##version=0

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:

byond://ThanatosxD.LargeNumbers##version=0

2 downloads
Latest Version
Date added: Jan 28
Last updated: Jan 29
0 fans
A simple lib that accurately does math for larger and smaller numbers, with decimals or without, negative or positive, and never reaches infinity.

Key Changes:
// use Int.Round(), Ceil(), Prob(), Floor() instead of built in BYOND functions.
var/Int/money = new(0)

money += 0.8
// money: 0.8

money += "0.7"
// money: 1.5

var/Int/rounded = result.Round()
// rounded: 2

var/Int/floored = result.Floor()
// floored: 1

// money: 1.5

money >= 0
// Result: 1

money -= "3"
// money: -1.5

money >= 0
// Result: 0