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
Midpoint interpolate is currently implemented like:
let denom = T::from_u8(2).unwrap(); (lower.unwrap() + higher.unwrap()).mapv_into(|x| x / denom.clone())
This causes overflows most times I use it, whereas implementing like (lower + (higher - lower))/2 would prevent this.
(lower + (higher - lower))/2
Also, happy to do a PR for this if it would be helpful but I figured it was such a small change it might be quicker if you guys sorted it yourselves 👍
The text was updated successfully, but these errors were encountered:
I see the fix has been merged so I'll close this issue 👍
Sorry, something went wrong.
No branches or pull requests
Midpoint interpolate is currently implemented like:
This causes overflows most times I use it, whereas implementing like
(lower + (higher - lower))/2
would prevent this.Also, happy to do a PR for this if it would be helpful but I figured it was such a small change it might be quicker if you guys sorted it yourselves 👍
The text was updated successfully, but these errors were encountered: