wp_fuzzy_number_match
wp_fuzzy_number_match ( $expected, $actual, $precision = 1 )
Parameters:- (int|float) expected The expected value.
- (int|float) actual The actual number.
- (int|float) precision Optional. The allowed variation. Default 1.
Returns:- (bool) Whether the numbers match within the specified precision.
Defined at: - Introduced in WordPress: 5.3.0
- Deprecated in WordPress: —
Description
Checks if two numbers are nearly the same.This is similar to using `round()` but the precision is more fine-grained.