We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i used to be able to do rng.gen with isize but not anymore
The text was updated successfully, but these errors were encountered:
This is intentional: #1487.
Why do you need this?
Sorry, something went wrong.
oh okay! so is this a breaking change then? i didnt see it mentioned in changelog but maybe im missing something.
i am making a game with a 2d maze and i use it for my teleport function:
fn teleport_destination_node(grid: &Grid, player_row: usize) -> Option<(usize, usize)> { let delta = roll(-2..13); let dest_row = player_row.saturating_add_signed(delta).clamp(0, grid.height.saturating_sub(1)); for col in 0..grid.width { if grid.node(dest_row, col).is_main { return Some((dest_row, col)); } } None }
it's not that important though so i can just refactor it. thanks for the info!
im using usize and isize because im doing indexing into 2d arrays and thats what rust asks for
was able to get around it by doing this (since you can make an isize from an i16):
let delta: isize = roll(-2i16..13i16).into();
No branches or pull requests
i used to be able to do rng.gen with isize but not anymore
The text was updated successfully, but these errors were encountered: