Checks whether a dimension exceeds the maximum allowed value.
Description
A maximum of zero means the dimension is unconstrained.
Parameters
$valueintrequired- The actual dimension in pixels.
$maxintrequired- The maximum allowed dimension in pixels. Zero means no constraint.
$toleranceintrequired- Pixel tolerance allowed for rounding differences.
Source
private function dimension_exceeds_max( int $value, int $max, int $tolerance ): bool {
return $max > 0 && $value > $max + $tolerance;
}
Changelog
| Version | Description |
|---|---|
| 7.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.