Function swap [src]
Efficiently swap a Rational with another. This swaps the limb pointers and a full copy is not
performed. The address of the limbs field will not be the same after this function.
Prototype
pub fn swap(r: *Rational, other: *Rational) void
Parameters
r: *Rational
other: *Rational
Source
pub fn swap(r: *Rational, other: *Rational) void {
r.p.swap(&other.p);
r.q.swap(&other.q);
}