* this.pars.getParValueDouble(eas.statistics.ConstantsStatistics.VERZERR_ATTR);
double b = this.ausd.x * this.pars.getParValueDouble(eas.statistics.ConstantsStatistics.VERZERR_ATTR);
double rad;
double alpha;
Vector2D neuPos = new Vector2D(this.getPosition());
Vector2D mitte = new Vector2D(this.getPosition());
Vector2D richtung = new Vector2D(this.getBlickrichtung());
Vector2D altePos;
double alteBlick;
boolean bool;
if (Math.abs(l) < this.epsilon && Math.abs(r) < this.epsilon) {
return true; // Beide Räder auf Null.
} else if (Math.abs(l - r) < this.epsilon) { // Differenz gleich.
neuPos = new Vector2D(this.getPosition());
richtung = new Vector2D(this.getBlickrichtung());
richtung.setLength(r);
neuPos.translate(richtung);
// umg.setzeLinie(mitte.x, mitte.y, neuPos.x, neuPos.y,
// Konstanten.FARBEN_BENUTZER[farbe], true, false, true, false);
return this.setPos(neuPos.x, neuPos.y, false);
} else if (Math.abs(l + r) < this.epsilon) { // Genau entgegengesetzt.
rad = b / 2;
alpha = r / rad;
// umg.setzeLinie(mitte.x, mitte.y, neuPos.x, neuPos.y,
// Konstanten.FARBEN_BENUTZER[farbe], true, false, true, false);
return this.setAngle(this.getAngle() - alpha / Math.PI * 180);
} else if (Math.abs(l) > Math.abs(r)) {
rad = b / (l / r - 1) + b / 2;
richtung.ortho();
richtung.setLength(rad);
mitte.sub(richtung);
if (r * l > 0) { // r und l haben dasselbe Vorzeichen.
alpha = r / rad;
} else {
alpha = 2 * r / b;
}
alpha = l / rad;
neuPos.rotate(mitte, alpha);
altePos = new Vector2D(this.getPosition());
alteBlick = this.getAngle();
bool = this.setPos(neuPos.x, neuPos.y, false);
// umg.setzeLinie(mitte.x, mitte.y, neuPos.x, neuPos.y,
// Konstanten.FARBEN_BENUTZER[farbe], true, false, true, false);
if (bool) {
bool = this.setAngle(this.getAngle() + alpha / Math.PI * 180);
if (!bool) {
this.setAngle(alteBlick);
this.setPos(altePos.x, altePos.y, false);
return false;
}
return true;
} else {
this.setPos(altePos.x, altePos.y, false);
return false;
}
} else if (Math.abs(r) > Math.abs(l)) {
rad = b / (r / l - 1) + b / 2;
richtung.ortho();
richtung.setLength(rad);
mitte.translate(richtung);
if (r * l > 0) { // r und l haben dasselbe Vorzeichen.
alpha = r / rad;
} else {
alpha = 2 * r / b;
}
neuPos.rotate(mitte, -alpha);
altePos = new Vector2D(this.getPosition());
alteBlick = this.getAngle();
bool = this.setPos(neuPos.x, neuPos.y, false);
// umg.setzeLinie(mitte.x, mitte.y, neuPos.x, neuPos.y,
// Konstanten.FARBEN_BENUTZER[farbe], true, false, true, false);
if (bool) {