This function returns the module of the input value, appropriately modified in the case of a negative input argument.
Syntax |
real abs_mod (real value, real step) |
||||||
---|---|---|---|---|---|---|---|
value |
Is the real unit whose module you want to calculate (can be a generic real expression) |
||||||
step |
Modulator value (can be a generic real expression, but must always give a positive value) |
||||||
Result |
Returns:
|
||||||
Validity |
Rule, Task |
||||||
Notes |
This formula allows the output to construct a "sawtooth" that extends uniformly even for negative values of the input unit |
Example usage: |