Function hydra_dx_math::lbp::calculate_linear_weights
source · pub fn calculate_linear_weights<BlockNumber: CheckedSub + TryInto<u32> + TryInto<u128>>(
start_x: BlockNumber,
end_x: BlockNumber,
start_y: LBPWeight,
end_y: LBPWeight,
at: BlockNumber
) -> Result<LBPWeight, MathError>
Expand description
Calculating weight at any given block in an interval using linear interpolation.
start_x
- beginning of an intervalend_x
- end of an intervalstart_y
- initial weightend_y
- final weightat
- block number at which to calculate the weight