9 factorAbs(
std::
abs(factor)), offset(offset), negativeFactor(factor < 0)
17 if (other.factorAbs.has_value())
19 factorAbs = other.factorAbs;
22 if (other.negativeFactor.has_value())
24 negativeFactor = other.negativeFactor;
27 if (other.offset.has_value())
29 offset = other.offset;
37 this->factorAbs = std::make_optional(factorAbs);
43 this->offset = std::make_optional(offset);
49 this->negativeFactor = isNegative;
55 return (negativeFactor.value_or(
false) ? -1 : 1) * factorAbs.value_or(1.f);
61 return offset.value_or(0.f);
67 float discontinuityOffset,
70 zeroOffset(zeroOffset),
71 discontinuityOffset(discontinuityOffset),
73 isInverted{isInverted}
78 ModularConvertedValueConfig
81 if (other.zeroOffset.has_value())
83 zeroOffset = other.zeroOffset;
86 if (other.discontinuityOffset.has_value())
88 discontinuityOffset = other.discontinuityOffset;
91 if (other.maxValue.has_value())
93 maxValue = other.maxValue;
96 if (other.isInverted.has_value())
98 isInverted = other.isInverted;
107 this->zeroOffset = zeroOffset;
113 this->isInverted = isInverted;
119 return zeroOffset.value_or(0.f);
125 return discontinuityOffset.value_or(0.f);
131 return maxValue.value_or(0.f);
137 return isInverted.value_or(
false);