Safe subtraction function?
Opened this issue · 1 comments
TropicSapling commented
Something like unsigned x = x safesub y
would only store the subtraction in x
if the result is positive.
TropicSapling commented
Related Rust function: https://doc.rust-lang.org/std/primitive.i32.html#method.saturating_sub