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 went to write some code that would iterate over all the pixels on the screen (inefficient I know, but it was to test something), and I found that I couldn't because nannou returns window dimensions as floating-point numbers (f32).
for pt_x in0..app.main_window().rect().w(){
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected integer, found `f32`
Why does nannou do this? I can't find anything in the docs about it, and I don't see another issue about this as far as I can tell.
The .size() method when building a window only takes integer values (u32 specifically), and I printed the window dimensions at runtime while resizing the window, but they always came back as whole numbers with an empty decimal component, so I'm unsure when the window size could ever be fractional. Do certain operating systems allow for sub-pixel window sizes?
The text was updated successfully, but these errors were encountered:
I went to write some code that would iterate over all the pixels on the screen (inefficient I know, but it was to test something), and I found that I couldn't because nannou returns window dimensions as floating-point numbers (
f32
).Why does nannou do this? I can't find anything in the docs about it, and I don't see another issue about this as far as I can tell.
The
.size()
method when building a window only takes integer values (u32
specifically), and I printed the window dimensions at runtime while resizing the window, but they always came back as whole numbers with an empty decimal component, so I'm unsure when the window size could ever be fractional. Do certain operating systems allow for sub-pixel window sizes?The text was updated successfully, but these errors were encountered: