Festlegung der Angabe des Farbkreises bei einem Vollkreis. Der Wert soll '0,0' lauten.

This commit is contained in:
2021-03-11 15:04:38 +01:00
parent 6c4f5231c0
commit 615cb0f655
@@ -55,6 +55,9 @@ class CyanMagentaYellowKeyToHueSaturationValue
$this->minCmyProperty = min($this->cyan, $this->magenta, $this->yellow);
$this->hue = $this->buildHueAmount();
if ($this->hue === 1.0) {
$this->hue = 0.0;
}
$this->saturation = $this->maxCmyProperty;
$this->value = 1 - $this->key;
}
@@ -71,7 +74,7 @@ class CyanMagentaYellowKeyToHueSaturationValue
protected function buildHueAmount(): float
{
if ($this->maxCmyProperty === 0) {
if ($this->maxCmyProperty === 0.0) {
return 0.0;
}
@@ -88,10 +91,6 @@ class CyanMagentaYellowKeyToHueSaturationValue
*/
private function hueAmount(string $property): float
{
if ($this->maxCmyProperty === 0.0) {
return 0.0;
}
static $amount_share = 2.0;
$divisor = $this->maxCmyProperty - $this->minCmyProperty;