public static int getFiringAngle(final Coords dest, int dest_facing, final Coords src) { int fa = dest.degree(src) - ((dest_facing % 6) * 60); if (fa < 0) { fa += 360; } else if (fa >= 360) { fa -= 360; } return fa; }
public int sideTableRam(Coords src, int facing) { int fa = (getPosition().degree(src) + ((6 - facing) * 60)) % 360; if (((fa > 30) && (fa <= 90)) || ((fa < 330) && (fa >= 270))) { return Aero.RAM_TOWARD_OBL; } else if ((fa > 150) && (fa < 210)) { return Aero.RAM_AWAY_DIR; } else if (((fa > 90) && (fa <= 150)) || ((fa < 270) && (fa >= 210))) { return Aero.RAM_AWAY_OBL; } else { return Aero.RAM_TOWARD_DIR; } }
int fa = src.degree(dest) - (facing * 60); if (fa < 0) { fa += 360;
/** * Returns true if the line between source Coords and target goes through * the hex in front of the attacker */ public static boolean isThroughFrontHex(IGame game, Coords src, Entity t) { Coords dest = t.getPosition(); int fa = dest.degree(src) - (t.getFacing() * 60); if (fa < 0) { fa += 360; } return (fa > 330) || (fa < 30); }
boolean bDivided = ((a.degree(b) % 60) == 30); int x = 0; int prevEcmStatus = 0;
private int getFacingDiff(final MovePath first) { if (first.isJumping()) { return 0; } if (first.getFinalCoords().equals(destination)) { return 0; } int firstFacing = Math.abs(((first.getFinalCoords().direction(destination) + (backward ? 3 : 0)) % 6) - first.getFinalFacing()); if (firstFacing > 3) { firstFacing = 6 - firstFacing; } if (first.canShift()) { firstFacing = Math.max(0, firstFacing - 1); } if ((first.getFinalCoords().degree(destination) % 60) != 0) { firstFacing++; } return firstFacing; } }
boolean bDivided = ((a.degree(b) % 60) == 30); int x = 0; int prevEcmStatus = 0;
int destAngle = mp.getFinalCoords().degree(dest);
double degree = ai.attackPos.degree(ai.targetPos); LosEffects finalLoS; if (degree % 60 == 30) {
int fa = (effectivePos.degree(src) + ((6 - face) * 60)) % 360;
int fa = (effectivePos.degree(src) + ((6 - face) * 60)) % 360;
double degree = start.degree(end); if ((degree % 60) == 30) { split = true;
int fa = (effectivePos.degree(src) + ((6 - face) * 60)) % 360;