square/cubism — pull request #10 by rhuss (2012-06-05 20:01:39+00:00)
Title: Integer index required for extracting value

For custom width of horizon graphs, the index received in a focus() callback is not alway an integer, but can be floating number. In order to set the proper value, the floating number must be converted to an integer in the range [0...width]. This patch use a Math.round() since it seems to be the most sensible convervsion.