Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Math lib update #1477
- Added math.BitCount( number num ) - returns the least amount of bits needed to represent an integer in binary. This function can be used with networking indexes for shared tables in the most network-efficient manner - Added math.IntToString( number num, number [2, 36] base, boolean caps --[[= false]] ) - this is the opposite of tonumber and will convert a decimal number to a base [2, 36] string. You can now achieve the same effect as math.IntToBin (be it a little less efficient) with this function. The caps arguments determines if the output string's characters should be capitalised (base 11+) - Added math.DistanceSqr - returns the distance squared between two points (faster than math.Distance) - math.IntToBin's return no longer has leading zeros - Fixed potential infinite loop with bad arguments to math.calcBSplineN/BSplinePoint - Localised global/library functions - Minor optimisations to some functions
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments.