Modulo (OperationTools/OperationMethod)

NodeCanvas Forums Support Modulo (OperationTools/OperationMethod)

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #12873
    timv
    Participant

    What is the best way to perform a modulo-operation on a blackboard value? (int or float)
    Would it be possible to add the modulo operator to the SetFloat/SetInteger blackboard tasks?

    #12874
    timv
    Participant

    Also, a min and max operator would also be very convenient. E.g. SetMax($Variable, 234) would mean $Variable = max($Variable, 234).

    #12878
    Gavalakis
    Keymaster

    Hello,

    That is a nice suggestion indeed, but I am a bit skeptical since the OperationTools and OperationMethod, are used for all float, int as well as Vector3 operations and as such, this means that any extra OperationMethod added in the enum, will also be possible to be selected in a Vector3 operation (SetVector action task for example). I am not sure how to handle Mod, Min, Max for Vector3 in this case. I could of course simply not handle these for Vector (return same vector), but it then might be confusing in the UI, the fact that it’s possible to select Mod, Min, Max even for a Vector3 operation 🙂

    It’s still a good suggestion though and I can see it being useful to be part of the same action rather than having a completely different one.
    Mod at least, makes sense since it IS an operation. I am still not sure about Max/Min though 🙂

    The changes are rather simple and if you want, I can walk you through how to add these in the code.

    Let me know what you think.
    Thanks!

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.