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
In the mousePressed() method, the mouseX and mouseY are divided respectively by width and height. All these are values provided by Processing, and are integers. However, in order to obtain a ratio, they would have to be floats. At this time, they are cast as floats so that the calculation works:
In the
mousePressed()
method, themouseX
andmouseY
are divided respectively bywidth
andheight
. All these are values provided by Processing, and are integers. However, in order to obtain a ratio, they would have to be floats. At this time, they are cast as floats so that the calculation works:Investigate if there is a better way to obtain that ratio.
https://processing.org/reference/width.html
https://processing.org/reference/height.html
https://processing.org/reference/mouseX.html
https://processing.org/reference/mouseY.html
The text was updated successfully, but these errors were encountered: