twice property
CompletedGroupElement
twice
Implementation
CompletedGroupElement get twice {
CompletedGroupElement r = CompletedGroupElement(
X: X.squared,
Y: X + Y,
Z: Y.squared,
T: Z.squaredMultiply2,
);
var t0 = r.Y.squared;
r.Y = r.Z + r.X;
r.Z = r.Z - r.X;
r.X = t0 - r.Y;
r.T = r.T - r.Z;
return r;
}