BitN = (short) (LastCarry + 1);
LastCarry = (short) ((BitN & 2) > 1? 1: 0);
BitN = (short) (BitN & 1);
if (BitN == 1) {
Rx = new Vec2(RadiusGyrMinMan, RadiusGyrMinExp);
}
AM = RadiusGyrMinMan;
AE = RadiusGyrMinExp;
BM = (short) Ry.getX();
BE = (short) Ry.getY();
LastCarry = 1;
while ((AM != 0) || (BM != 0)) {
if (AE > BE) {
BitN = (short) (LastCarry + (AM & 1) + 1);
AM >>= 1;
AE = (short) ((AE==0)?255:AE-1);
} else if (AE < BE) {
BitN = (short) (LastCarry + ((~(BM & 1))&1));
BM >>= 1;
BE = (short) ((BE==0)?255:BE-1);
} else { /* AE == BE */
BitN = (short) (LastCarry + (AM & 1) + ((~(BM & 1))&1));
AM >>= 1;
BM >>= 1;
AE = (short) ((AE==0)?255:AE-1);
BE = (short) ((BE==0)?255:BE-1);
}
LastCarry = (short) ((BitN & 2) > 1? 1: 0);
BitN = (short) (BitN & 1);
}
BitN = (short) (LastCarry + 1);
LastCarry = (short) ((BitN & 2) > 1? 1 : 0);
BitN = (short) (BitN & 1);
if (BitN == 1) {
Ry = new Vec2(RadiusGyrMinMan, RadiusGyrMinExp);
}
AM = RadiusGyrMaxMan;
AE = RadiusGyrMaxExp;
BM = (short) Rx.getX();
BE = (short) Rx.getY();
LastCarry = 1;
while ((AM != 0) || (BM != 0)) {
if (AE > BE) {
BitN = (short) (LastCarry + (AM & 1) + 1);
AM >>= 1;
AE = (short) ((AE==0)?255:AE-1);
} else if (AE < BE) {
BitN = (short) (LastCarry + ((~(BM & 1))&1));
BM >>= 1;
BE = (short) ((BE==0)?255:BE-1);
} else { /* AE == BE */
BitN = (short) (LastCarry + (AM & 1) + ((~(BM & 1))&1));
AM >>= 1;
BM >>= 1;
AE = (short) ((AE==0)?255:AE-1);
BE = (short) ((BE==0)?255:BE-1);
}
LastCarry = (short) ((BitN & 2) > 1? 1 : 0);
BitN = (short) (BitN & 1);
}
BitN = (short) (LastCarry + 1);
LastCarry = (short) ((BitN & 2) > 1? 1 : 0);
BitN = (short) (BitN & 1);
if (BitN == 1) {
RxInvLarge = 1;
} else {
RxInvLarge = 0;
}
AM = (short) Ry.getX();
AE = (short) Ry.getY();
BM = RadiusGyrMaxMan;
BE = RadiusGyrMaxExp;
LastCarry = 1;
while ((AM != 0) || (BM != 0)) {
if (AE > BE) {
BitN = (short) (LastCarry + (AM & 1) + 1);
AM >>= 1;
AE = (short) ((AE==0)?255:AE-1);
} else if (AE < BE) {
BitN = (short) (LastCarry + ((~(BM & 1))&1));
BM >>= 1;
BE = (short) ((BE==0)?255:BE-1);
} else { /* AE == BE */
BitN = (short) (LastCarry + (AM & 1) + ((~(BM & 1))&1));
AM >>= 1;
BM >>= 1;
AE = (short) ((AE==0)?255:AE-1);
BE = (short) ((BE==0)?255:BE-1);
}
LastCarry = (short) ((BitN & 2) > 1? 1 : 0);
BitN = (short) (BitN & 1);
}
BitN = (short) (LastCarry + 1);
LastCarry = (short) ((BitN & 2) > 1? 1 : 0);
BitN = (short) (BitN & 1);
if (BitN == 1) {
RyInvSmall = 1;
} else {
RyInvSmall = 0;
}
if (RxInvLarge != 0 && RyInvSmall != 0) {
Ry = new Vec2(RadiusGyrMaxMan, RadiusGyrMaxExp);
}
return new Pair(Rx, Ry);
}