Skip to content

Instantly share code, notes, and snippets.

@itwysgsl
Created October 22, 2018 09:34
Show Gist options
  • Save itwysgsl/f7da47f9d01fdbdc3a73ecc51ae9d04a to your computer and use it in GitHub Desktop.
Save itwysgsl/f7da47f9d01fdbdc3a73ecc51ae9d04a to your computer and use it in GitHub Desktop.
if (next_target > (previous_diff * 150) / 100) { next_target = (previous_diff * 150) / 100; }
if ((previous_diff * 150) / 100 > next_target) { next_target = (previous_diff * 150); }
next_target = std::max((previous_diff * 67) / 100, std::min(next_target, (previous_diff * 150) / 100));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment