pub fn to_range_payouts(
        &self,
        total_collateral: u64,
        rounding_intervals: &RoundingIntervals,
        range_payouts: &mut Vec<RangePayout>,
    ) -> Result<(), Error> {
        match self {
            PayoutFunctionPiece::PolynomialPayoutCurvePiece(p) => {
                p.to_range_payouts(rounding_intervals, total_collateral, range_payouts)
            }
            PayoutFunctionPiece::HyperbolaPayoutCurvePiece(h) => {
                h.to_range_payouts(rounding_intervals, total_collateral, range_payouts)
            }
        }
    }
/// Generate the range payouts for the function piece.
Generate the range payouts for the function piece.
Generate the range payouts for the function piece .
pub fn to_range_payouts(
        &self,
        total_collateral: u64,
        rounding_intervals: &RoundingIntervals,
        range_payouts: &mut Vec<RangePayout>,
    ) -> Result<(), Error> {
        match self {
            PayoutFunctionPiece::PolynomialPayoutCurvePiece(p) => {
                p.to_range_payouts(rounding_intervals, total_collateral, range_payouts)
            }
            PayoutFunctionPiece::HyperbolaPayoutCurvePiece(h) => {
                h.to_range_payouts(rounding_intervals, total_collateral, range_payouts)
            }
        }
    }
pub fn to_range_payouts ( & self , total_collateral : u64 , rounding_intervals : & RoundingIntervals , range_payouts : & mut Vec < RangePayout > , ) -> Result < ( ) , Error > { match self { PayoutFunctionPiece :: PolynomialPayoutCurvePiece ( p ) => { p . to_range_payouts ( rounding_intervals , total_collateral , range_payouts ) } PayoutFunctionPiece :: HyperbolaPayoutCurvePiece ( h ) => { h . to_range_payouts ( rounding_intervals , total_collateral , range_payouts ) } } }
Generate the range payouts for the function piece.
Generate the range payouts for the function piece .
&self
total_collateral
u64
rounding_intervals
&RoundingIntervals
range_payouts
&mut Vec<RangePayout>