clean-code #4
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user