From 2a09e4ce9f6095db88dca5eb823735a47c371c2b Mon Sep 17 00:00:00 2001 From: Mark Hameetman Date: Fri, 3 Sep 2021 15:08:55 +0200 Subject: [PATCH] Change int to float to get precise numbers --- .../InkCoverageExtractor/InkCoverageExtractor.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/BureauPartners/InkCoverageExtractor/InkCoverageExtractor.php b/src/BureauPartners/InkCoverageExtractor/InkCoverageExtractor.php index 1bd14f0..003bbda 100644 --- a/src/BureauPartners/InkCoverageExtractor/InkCoverageExtractor.php +++ b/src/BureauPartners/InkCoverageExtractor/InkCoverageExtractor.php @@ -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,