Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace array_search with floating-point filter
array_search seems to fail in most cases when looking for a float in an array of floats. And even if it does find a match, if the key is 0, php evaluates `!0` to true. To find a match, we can instead loop through and compare the numbers with `Arithmetic::almostEqual` and then explicitly check if `$key === false`
- Loading branch information