ceil
Intervention/image
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Round fractions up
ceil
(
int
|
float $num
):
float
$newMin
=
127
;
$newMax
=
0
;
return
ceil
((((
$input
-
$oldMin
) * (
$newMax
-
$newMin
)) / (
$oldMax
-
$oldMin
)) +
$newMin
);
}
}
src/Intervention/Image/Gd/Color.php
if (
in_array
(
'top'
,
$away
)) {
for (
$y
=
0
;
$y
<
ceil
(
$height
/
2
);
$y
++) {
for (
$x
=
0
;
$x
<
$width
;
$x
++) {
$checkColor
=
$image
->
pickColor
(
$x
,
$y
,
'object'
);
src/Intervention/Image/Gd/Commands/TrimCommand.php
if (
in_array
(
'left'
,
$away
)) {
for (
$x
=
0
;
$x
<
ceil
(
$width
/
2
);
$x
++) {
for (
$y
=
$top_y
;
$y
<
$height
;
$y
++) {
$checkColor
=
$image
->
pickColor
(
$x
,
$y
,
'object'
);
src/Intervention/Image/Gd/Commands/TrimCommand.php
protected function
getPointSize
()
{
return
intval
(
ceil
(
$this
->
size
*
0.75
));
}
src/Intervention/Image/Gd/Font.php
switch (
strtolower
(
$this
->
align
)) {
case
'center'
:
$posx
=
ceil
(
$posx
- (
$width
/
2
));
break;
case
'right'
:
src/Intervention/Image/Gd/Font.php
break;
case
'right'
:
$posx
=
ceil
(
$posx
-
$width
) +
1
;
break;
}
src/Intervention/Image/Gd/Font.php
switch (
strtolower
(
$this
->
valign
)) {
case
'center'
:
case
'middle'
:
$posy
=
ceil
(
$posy
- (
$height
/
2
));
break;
case
'top'
:
src/Intervention/Image/Gd/Font.php
break;
case
'top'
:
$posy
=
ceil
(
$posy
-
$top_correction
);
break;
default:
src/Intervention/Image/Gd/Font.php