Trying and failing to convert float32 to integer

    Dec 02 2012 | 5:38 am
    I'm trying to use Jitter to generate a biased sine table made out of 8-bit integer values. I thought it would be easiest to start with floats and convert to integers at the end. I seem to be generating the data fine in float32 format, but I am not able to convert the resulting Jitter matrix to char or long. I have tried jit.coerce and a second jit.matrix object, but in both cases the result is garbage data. Am I misunderstanding what jit.coerce is supposed to do?

    • Dec 02 2012 | 8:23 am
      like this?????
    • Dec 02 2012 | 6:16 pm
      Thanks, that's exactly what I need! For my own understanding, why does it have to be of type long when all the integers are less than 256?