Closed
Description
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.
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 👍