Core Function
View Source on Trac ↗ wp_fuzzy_number_match()
wp_fuzzy_number_match( mixed $expected, mixed $actual, mixed $precision = 1 ) Checks if two numbers are nearly the same.
Parameters 3 required
| Name / Type | Description |
|---|---|
| (int | | float) $expected The expected value. Required |
| (int | | float) $actual The actual number. Required |
| (int | | float) $precision Optional. The allowed variation. Default 1. Required |
Return Value
(bool)
Whether the numbers match within the specified precision.
Function Information
Since Version
5.3.0
Source File
wp-includes/functions.php
Advertisement