recipe.CompareNumbers[]
- Function
- boolean recipe.CompareNumbers(number num1, number num2)
- Description
- Returns true if the two real numbers are the same to the precision that Lua prints.
- V1 Function Name
- New to V2
- More Information
- Details
Remarks[]
Lua sometimes returns that a == b is true, but when you print out the numbers they appear different by a small fraction. Using recipe.CompareNumbers(a, b) allows comparing two numbers to the the maximum precision available on a system.