8 factorAbs(
std::
abs(factor)), offset(offset), negativeFactor(factor < 0)
16 if (other.factorAbs.has_value())
18 factorAbs = other.factorAbs;
21 if (other.negativeFactor.has_value())
23 negativeFactor = other.negativeFactor;
26 if (other.offset.has_value())
28 offset = other.offset;
36 this->factorAbs = std::make_optional(factorAbs);
42 this->offset = std::make_optional(offset);
48 this->negativeFactor = isNegative;
54 return (negativeFactor.value_or(
false) ? -1 : 1) * factorAbs.value_or(1.f);
60 return offset.value_or(0.f);
66 float discontinuityOffset,
69 zeroOffset(zeroOffset),
70 discontinuityOffset(discontinuityOffset),
72 isInverted{isInverted}
77 ModularConvertedValueConfig
80 if (other.zeroOffset.has_value())
82 zeroOffset = other.zeroOffset;
85 if (other.discontinuityOffset.has_value())
87 discontinuityOffset = other.discontinuityOffset;
90 if (other.maxValue.has_value())
92 maxValue = other.maxValue;
95 if (other.isInverted.has_value())
97 isInverted = other.isInverted;
106 this->zeroOffset = zeroOffset;
112 this->isInverted = isInverted;
118 return zeroOffset.value_or(0.f);
124 return discontinuityOffset.value_or(0.f);
130 return maxValue.value_or(0.f);
136 return isInverted.value_or(
false);