Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Absolute value
<?php abs(int|float $num): int|float
<?php $alpha_tolerance = round($tolerance * 1.27);
$delta = [
'r' => abs($color->r - $this->r),
'g' => abs($color->g - $this->g),
'b' => abs($color->b - $this->b),
'a' => abs($color->a - $this->a)
<?php $delta = [
'r' => abs($color->r - $this->r),
'g' => abs($color->g - $this->g),
'b' => abs($color->b - $this->b),
'a' => abs($color->a - $this->a)
];
<?php $delta = [
'r' => abs($color->r - $this->r),
'g' => abs($color->g - $this->g),
'b' => abs($color->b - $this->b),
'a' => abs($color->a - $this->a)
];
<?php 'r' => abs($color->r - $this->r),
'g' => abs($color->g - $this->g),
'b' => abs($color->b - $this->b),
'a' => abs($color->a - $this->a)
];
return (
<?php }
}
$box['width'] = intval(abs($box[4] - $box[0]));
$box['height'] = intval(abs($box[5] - $box[1]));
} else {
<?php }
$box['width'] = intval(abs($box[4] - $box[0]));
$box['height'] = intval(abs($box[5] - $box[1]));
} else {
<?php $alpha_tolerance = round($tolerance);
$delta = [
'r' => abs($color->getRedValue() - $this->getRedValue()),
'g' => abs($color->getGreenValue() - $this->getGreenValue()),
'b' => abs($color->getBlueValue() - $this->getBlueValue()),
'a' => abs($color->getAlphaValue() - $this->getAlphaValue())
<?php $delta = [
'r' => abs($color->getRedValue() - $this->getRedValue()),
'g' => abs($color->getGreenValue() - $this->getGreenValue()),
'b' => abs($color->getBlueValue() - $this->getBlueValue()),
'a' => abs($color->getAlphaValue() - $this->getAlphaValue())
];
<?php $delta = [
'r' => abs($color->getRedValue() - $this->getRedValue()),
'g' => abs($color->getGreenValue() - $this->getGreenValue()),
'b' => abs($color->getBlueValue() - $this->getBlueValue()),
'a' => abs($color->getAlphaValue() - $this->getAlphaValue())
];
<?php 'r' => abs($color->getRedValue() - $this->getRedValue()),
'g' => abs($color->getGreenValue() - $this->getGreenValue()),
'b' => abs($color->getBlueValue() - $this->getBlueValue()),
'a' => abs($color->getAlphaValue() - $this->getAlphaValue())
];
return (
<?php $box['height'] = 0;
} else {
$box['width'] = intval(abs($dimensions['textWidth']));
$box['height'] = intval(abs($dimensions['textHeight']));
}
<?php } else {
$box['width'] = intval(abs($dimensions['textWidth']));
$box['height'] = intval(abs($dimensions['textHeight']));
}
return $box;