Getting the position of a clicked pixel from pixel[]
in
Programming Questions
•
8 months ago
So, I get (And like!) how pixel[] works- A 10x10 grid has an array of size 100.
My problem is figuring out how to get the array index of a clicked pixel. In a 640x480 display, if I click at 320,239 what index is that in pixel[]? I figure there's some very simple math here I'm just not seeing.
1