fn cmov(x: *Self, on: bool, y: Self) void
Replaces the limbs of x with the limbs of y if on is true.
x
y
on
true
x: *Self
on: bool
y: Self
265 266 267 268 269
fn cmov(x: *Self, on: bool, y: Self) void { for (x.limbs(), y.limbsConst()) |*x_limb, y_limb| { x_limb.* = ct.select(on, y_limb, x_limb.*); } }
Replaces the limbs of
xwith the limbs ofyifonistrue.