WordPress at a glance
function is not described

wp_fuzzy_number_match() WP 5.3.0

Check if two numbers are nearly the same.

This is similar to using round() but the precision is more fine-grained.

No Hooks.

Return

true|false. Whether the numbers match whithin the specified precision.

Usage

wp_fuzzy_number_match( $expected, $actual, $precision );
$expected(int|float) (required)
The expected value.
$actual(int|float) (required)
The actual number.
$precision(int|float)
The allowed variation.

Changelog

Since 5.3.0 Introduced.

Code of wp_fuzzy_number_match() WP 5.7

<?php
function wp_fuzzy_number_match( $expected, $actual, $precision = 1 ) {
	return abs( (float) $expected - (float) $actual ) <= $precision;
}