Skip to content

Commit

Permalink
Change int to float to get precise numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
markhameetman committed Sep 3, 2021
1 parent ce05a42 commit 2a09e4c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ private function processOutput(array $output): void
$match = preg_replace('/\s+/', ' ', $match);
$match_parts = explode(' ', $match);
if ($current_page > 0 && count($match_parts) > 0 && is_numeric($match_parts[0])) {
$color_c = (int) $match_parts[0];
$color_m = (int) $match_parts[1];
$color_y = (int) $match_parts[2];
$color_k = (int) $match_parts[3];
$color_c = (float) $match_parts[0];
$color_m = (float) $match_parts[1];
$color_y = (float) $match_parts[2];
$color_k = (float) $match_parts[3];
$this->pages[$current_page] = [
'C' => $color_c,
'M' => $color_m,
Expand Down

0 comments on commit 2a09e4c

Please sign in to comment.