Also, when comparing float values with the equal operation you’ll have to use a small error of margin in your code. Example:
local A = 0.1 + 0.2
local B = 0.3
local err = 1e-6
print(math.abs(A - B) <= err)
Also, when comparing float values with the equal operation you’ll have to use a small error of margin in your code. Example:
local A = 0.1 + 0.2
local B = 0.3
local err = 1e-6
print(math.abs(A - B) <= err)