pub fn accumulate_inverse(&mut self, transposition: &impl Transposition) {
        // We can't inline this if statement, because doing so would require us to clone the
        // Change or anger the borrow checker.
        if self.using_second_change {
            self.change_2
                .multiply_inverse_into(transposition, &mut self.change_1);
        } else {
            self.change_1
                .multiply_inverse_into(transposition, &mut self.change_2);
        }

        // Swap the buffers so that the result is in the 'front' buffer
        self.using_second_change = !self.using_second_change;
    }
/// Accumulate the inverse of a [Transposition] into the accumulator, without storing that
/// inverse in memory.
///
/// # Example
/// ```
/// use bellmetal::{Change, ChangeAccumulator, Stage};
///
/// let mut accum = ChangeAccumulator::new(Stage::MAJOR);
///
/// let arbitrary_change = Change::from("65812437");
///
/// // Accumulate an arbitrary_change and its inverse, ...
/// accum.accumulate(&arbitrary_change);
/// accum.accumulate_inverse(&arbitrary_change);
///
/// // ... and the result should be rounds, since the effect of the two changes cancel out
/// assert_eq!(accum.total(), &Change::rounds(Stage::MAJOR));
Accumulate the inverse of a [Transposition] into the accumulator, without storing that
inverse in memory.
Accumulate the inverse of a [ Transposition ] into the accumulator without storing that inverse in memory .
pub fn accumulate_inverse(&mut self, transposition: &impl Transposition) {
        // We can't inline this if statement, because doing so would require us to clone the
        // Change or anger the borrow checker.
        if self.using_second_change {
            self.change_2
                .multiply_inverse_into(transposition, &mut self.change_1);
        } else {
            self.change_1
                .multiply_inverse_into(transposition, &mut self.change_2);
        }
        // Swap the buffers so that the result is in the 'front' buffer
        self.using_second_change = !self.using_second_change;
    }
pub fn accumulate_inverse ( & mut self , transposition : & impl Transposition ) { // We can't inline this if statement, because doing so would require us to clone the // Change or anger the borrow checker. if self . using_second_change { self . change_2 . multiply_inverse_into ( transposition , & mut self . change_1 ) ; } else { self . change_1 . multiply_inverse_into ( transposition , & mut self . change_2 ) ; } // Swap the buffers so that the result is in the 'front' buffer self . using_second_change = ! self . using_second_change ; }
Accumulate the inverse of a [Transposition] into the accumulator, without storing that
inverse in memory.
Accumulate the inverse of a [ Transposition ] into the accumulator without storing that inverse in memory .
&mut self
transposition
&impl Transposition
&mut self
transposition
&impl Transposition
example
```
use bellmetal::{Change, ChangeAccumulator, Stage}.

let mut accum = ChangeAccumulator::new(Stage::MAJOR).



Accumulate an arbitrary_change and its inverse,
accum.accumulate(&arbitrary_change);
accum.accumulate_inverse(&arbitrary_change).

and the result should be rounds, since the effect of the two changes cancel out
assert_eq!(accum.total(), &Change::rounds(Stage::MAJOR)).
` ` ` use bellmetal :: { Change ChangeAccumulator Stage } . let mut accum = ChangeAccumulator :: new ( Stage :: MAJOR ) . Accumulate an arbitrary_change and its inverse accum . accumulate ( &arbitrary_change ) ; accum . accumulate_inverse ( &arbitrary_change ) . and the result should be rounds since the effect of the two changes cancel out assert_eq! ( accum . total () &Change :: rounds ( Stage :: MAJOR )) .