FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important
information on the platform change.
05-16-2024 04:18 PM
Hello:
I read the discrption about the function "IL_GetModuloType01" in the manual.But I still don't understant how it works.
Can you give an example of using this function?
Thanks.
Solved! Go to Solution.
05-17-2024 01:30 PM - edited 05-17-2024 01:33 PM
IL_GetModuloType01 is a real-value analog of the MOD funtion:
In the example above (with Modulo=360), it returns the unique value (here rOutput) such that rOutput lies in the range [0, 360) and such that (rOutput - rInput) is a multiple of 360. (Note that in most cases there is of course some error due to the limitations of floating point math...)
Sometimes it is required to find a modulo representative in a range other than [0, Modulo). In these cases you can use the following trick:
, which returns a value in the range [rOffset, Modulo + rOffset).
06-12-2024 09:29 AM