You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to use this for backing a d3.js graph, and after a bit of debugging found that (to me) it looks like the semantics of .length and .size are the wrong way around. That is to say, for a "plain" JS Array, .length is (usually, except for some edge cases) the number of elements in the array, what is CBuffer.size here.
For using CBuffer as a "drop-in" replacement for a plain old Array, exchanging these meanings might be helpful. What do you think?
The text was updated successfully, but these errors were encountered:
I was trying to use this for backing a d3.js graph, and after a bit of debugging found that (to me) it looks like the semantics of
.length
and.size
are the wrong way around. That is to say, for a "plain" JSArray
,.length
is (usually, except for some edge cases) the number of elements in the array, what isCBuffer.size
here.For using
CBuffer
as a "drop-in" replacement for a plain oldArray
, exchanging these meanings might be helpful. What do you think?The text was updated successfully, but these errors were encountered: