maj even/odd

This commit is contained in:
Jephté Clain 2024-11-30 06:08:15 +04:00
parent 71ca020b1e
commit 19a3cb9b76

View File

@ -234,11 +234,11 @@ class SpoutBuilder extends AbstractBuilder {
protected ?bool $differentOddEven = null;
protected int $oddEvenIndex = 1;
protected int $oddEvenIndex = 0;
function setDifferentOddEven(bool $differentOddEven, bool $startWithOdd=true): self {
function setDifferentOddEven(bool $differentOddEven, ?bool $startWithOdd=null): self {
$this->differentOddEven = $differentOddEven;
if ($differentOddEven) $this->oddEvenIndex = $startWithOdd? 1: 0;
if ($differentOddEven && $startWithOdd !== null) $this->oddEvenIndex = $startWithOdd? 1: 0;
return $this;
}