pub fn copy(self: *Mutable, other: Const) void 259
260
261
262
263
264
265
266
267 pub fn copy(self: *Mutable, other: Const) void {
if (self.limbs.ptr != other.limbs.ptr) {
@memcpy(self.limbs[0..other.limbs.len], other.limbs[0..other.limbs.len]);
}
// Normalize before setting `positive` so the `eqlZero` doesn't need to iterate
// over the extra zero limbs.
self.normalize(other.limbs.len);
self.positive = other.positive or other.eqlZero();
}
Copies the value of a Const to an existing Mutable so that they both have the same value. Asserts the value fits in the limbs buffer.