Yeah, that looks like what I am seeing, too. But large flicks like that are not how a user scrolls a graph, usually. Users want to examine the waveform and other data that I am graphing, so they will want to be able to scroll in a fine, continuous manner.
When I try moving slowly the way I would trying to center a waveform in my graph, I get nothing but those 0.00195312 values (or 0s). That’s obviously not how the Xcode editor works, or the browser in which I’m viewing this post, or anything else I know of.
I can see that the code is scaling the event’s distances down, in this code:
if ([ev hasPreciseScrollingDeltas])
const float scale = 0.5f / 256.0f;
wheel.deltaX = scale * (float) [ev scrollingDeltaX];
wheel.deltaY = scale * (float) [ev scrollingDeltaY];
wheel.isSmooth = true;
That scale value is where the number 0.001953125 comes from, which means we are getting the raw number 1(.0) from [ev scrollingDeltaX]. I don’t know why that is scaled down by 512, and there is nothing documenting this behavior.
How can I get better control of my scrolling, so users can experience scrolling my graph with two-finger gestures the same way they do in other applications? It looks like I can just multiply by 512 and get back the raw values, but I’m unsure what will happen when using other devices besides my Mac’s trackpad.