floor
Intervention/image
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Round fractions down
floor
(
int
|
float $num
):
float
if (
in_array
(
'bottom'
,
$away
)) {
for (
$y
=(
$height
-
1
);
$y
>=
floor
(
$height
/
2
)-
1
;
$y
--) {
for (
$x
=
$top_x
;
$x
<
$width
;
$x
++) {
$checkColor
=
$image
->
pickColor
(
$x
,
$y
,
'object'
);
src/Intervention/Image/Gd/Commands/TrimCommand.php
if (
in_array
(
'right'
,
$away
)) {
for (
$x
=(
$width
-
1
);
$x
>=
floor
(
$width
/
2
)-
1
;
$x
--) {
for (
$y
=
$top_y
;
$y
<
$bottom_y
;
$y
++) {
$checkColor
=
$image
->
pickColor
(
$x
,
$y
,
'object'
);
src/Intervention/Image/Gd/Commands/TrimCommand.php