fl.modulo~ misunderstanding

Issue #42 resolved
Francesco Cameli created an issue

Hello everyone, I think I am missing something about fl.modulo~, as I was expecting it to be working differently. I was expecting for it to work as the modulo operation of other array-processing libraries, such as NumPy. I created a little abstraction (fl.wrap~) that performs what I was expecting from fl.modulo~, though it only works with positive frame values and positive modulo value. It is also attached a comparison between my abstraction and NumPy's numpy.mod(). What I don't understand is why fl.modulo~ wraps to negative values above half the value of the modulo.

Comments (3)

  1. Alex Harker repo owner

    Yes- I wrapped the wrong <cmath> routine by accident (remainder, rather than fmod). I've fixed it for the next one.

  2. Log in to comment