clean-code #4

Merged
TorstenHettstedt merged 9 commits from clean-code into master 2021-03-23 16:25:58 +01:00
2 changed files with 5 additions and 5 deletions
Showing only changes of commit 0e033b1fbe - Show all commits
@@ -39,9 +39,9 @@ class HueSaturationValueToCyanMagentaYellowKey extends AbstractHueSaturationValu
protected function splitColor(): void
{
// ID des zu nutzenden Interval
$interval_id = intdiv($this->hueAsPercentGrad , self::INTERVAL);
$interval_id = $this->hueAsPercentGrad / self::INTERVAL;
switch ($interval_id) {
switch ((int)$interval_id) {
case 1: // Yellow
$this->cyan = $this->calcColorValue();
$this->yellow = $this->saturation;
@@ -36,11 +36,11 @@ class HueSaturationValueToRedGreenBlue extends AbstractHueSaturationValueToUtili
protected function splitColor(): void
{
// ID des zu nutzenden Interval
$interval_id = intdiv($this->hueAsPercentGrad , self::INTERVAL);
$interval_id = $this->hueAsPercentGrad / self::INTERVAL;
// Ist der Wert der entgegen gesetzten Farbe.
$opposite_color_value = $this->value * ( 1 - $this->saturation);
switch ($interval_id) {
switch ((int)$interval_id) {
case 1:
$this->red = $this->calcColorValue();
$this->blue = $opposite_color_value;