Quantized values in function object?

    Nov 21 2009 | 11:40 am
    Let's say I have function object set to contain values from "-12 to 12".
    Is there any way that I can make sure changes that are drawn in functions are "quantized" to ints? Since functions uses float values?
    So that the points drawn are only "1", "-4", "5" etc.?

    • Nov 21 2009 | 12:57 pm
      This kind of works. Or you can have a look at ej.function.js which has a snap to grid feature built in.
    • Nov 21 2009 | 4:37 pm
      Thanks for the tip!
      ej.function.js looks great, amazing the things it can do in addition to quantize.
    • Nov 21 2009 | 4:45 pm
      it should be enough to just round the output to int, no?
      edit: (i should try to read posts before i answer)
    • Nov 21 2009 | 4:57 pm
      That's the solution I was going for when I got hint of es.function, I'm just struggling to reflect the int change back into the (drawn) function curve. I'm not an expert on this, but I think I'll (try to) finish it for the sake of it.
      Then I'll go on to es.function.