Releases: KdudeDev/InfiniteMath
1.3.10
-
Improved
:aaNotation()
by adding a new variable called 'AALENGTHMAX', which lets you set the amount of letters used. The letter amount will also only start at 1 letter, and add more as the number needs them. Once a number reaches1z
, it will turn into1aa
.1zz
into1aaa
, up until it hitsAAMAXLENGTH
. The default value forAAMAXLENGTH
is3
-
Improves
.new()
usage with tables. Before, a table withfirst
andsecond
would be assumed as a constructed number, and just return the table. This doesn't account for if the metatable info is lost when saved in a datastore or sent through aRemoteEvent
..new()
now checks for the metatable and correctly creates numbers that havefirst
andsecond
values.
1.3.9
-
Fix comparisons not correctly comparing negative and positive numbers.
-45 > 0
would returntrue
, this would impact comparison and any function that used it (min, max, clamp, etc.). It now correctly returnsfalse
. -
Adds a new :SetValue() function. This sets the value of a constructed number, which is better practice than creating a new number with a different value as it doesn't need to create new metatable (better for memory I believe). The function takes a new
first
andsecond
and sets thefirst
andsecond
of the constructed number to the new values. -
Fixed an error with
:ConvertFromLeaderboards()
when given 0. -
Fixed an issue with
:aaNotation()
where instead of using z it would use scientific notation.
1.3.8
-
Fixed a bug with very small numbers (that get stored as scientific notation, like
1e-15
) displaying incorrectly. -
Improves
InfiniteMath.round()
, reduces cases of incorrectly picking ceil or floor over the other. -
Added a new Datastore Implementation page to the docs website.
-
Corrects a mistake in the Suffixes module, QNV (Quinvigintillion) was instead QNT, even though there is already QNT (Quattuornonagintaducentillion).
-
Improves some type checking that was added
1.3.7
,.new()
no longer throws a warning with tables or InfiniteMath numbers.
1.3.7
-
Fixes the
.00
fix not working withDECIMALPOINT
not being 2,.000
or .0
will now be fixed just like.00
. -
Fixed
.99
showing up at the end of numbers that are very close to being whole. For example5
might be stored as4.99999999999523525
, displaying as4.99
(decimal amount depending onDECIMALPOINT
), numbers ending in a decimal very close to1
will now be rounded up.4.99999999999523525
will display as5
. -
Fixed numbers below 1 not using
DECIMALPOINT
in:GetSuffix()
. -
Fix C stack overflow error when using
.__concat
with an InfiniteMath number as the second parameter -
Improved
pow is not a valid power
error for.__pow
, the error now explains that if your power isinf
you need to keep it below10^308
.
1.3.6
- Fixed an issue with
InfiniteMath.new()
where strings such as"1e+5"
or"50000"
would error. - Fixed an issue where if
DECIMALPOINT
cuts off the decimal of a number display such as10.00025
, it would display with zeros after the point, like10.00
. If the decimal of a displaying number (usingGetSuffix
) is equal to 0, it will be removed.10.00
turns into10
. - Fixed an issue where super low decimals that get turned into Scientific Notation, such as
5e-5
which equals0.00005
would cause multiple errors.
1.3.5
- Marks the module as native (with
--!native
) to increase performance.
Using this function before this update will take approx 2.6201
seconds. After this update it takes approx 1.6117
seconds (38.48% improvement). Certain functions are impacted more than others (only using new
results in an 8.45% improvement)
local IM = require(game.ReplicatedStorage.InfiniteMath)
local ticker = tick()
for i = 1, 100000 do
local Num = IM.new(i)
Num *= i
Num ^= i
Num = IM.round(Num)
end
print(tick() - ticker)
Currently, you need to enable the Luau Native Code beta to see the effects, and live servers will not be impacted until full release.
1.3.4
1.3.3
1.3.2
- Fixed
floor
andceil
accuracy with negative numbers. - Improved the
__eq
nan
check by removingtostring
usage.nan
is already stored as a string, so usingtostring
is pointless. - Fixed errors when creating a
Number
with-0
. The created number will have a value of0
. If you need the value to be-0
, please give a usage case.