#if0
Position Rect::constrainedAvoid(Position &offset, Rect &box, Rect &sdbox, Position &other, Rect &obox, Rect &osdbox)
{ // a = max, i = min, s = sum, d = diff float eax, eay, eix, eiy, eas, eis, ead, eid; float beste = INF;
Position res; // calculate the movements in each direction and the error (amount of remaining overlap) // first param is movement, second and third are movement over the constraining box float ax = boundmin(obox.tr.x + other.x - box.bl.x - offset.x + 1, tr.x - offset.x, INF, &eax); float ay = boundmin(obox.tr.y + other.y - box.bl.y - offset.y + 1, tr.y - offset.y, INF, &eay); float ix = boundmin(obox.bl.x + other.x - box.tr.x - offset.x + 1, bl.x - offset.x, INF, &eix); float iy = boundmin(obox.bl.y + other.y - box.tr.y - offset.y + 1, bl.y - offset.y, INF, &eiy); float as = boundmin(ISQRT2 * (osdbox.tr.x + other.x + other.y - sdbox.bl.x - offset.x - offset.y) + 1, tr.x - offset.x, tr.y - offset.y, &eas); float is = boundmin(ISQRT2 * (osdbox.bl.x + other.x + other.y - sdbox.tr.x - offset.x - offset.y) + 1, bl.x - offset.x, bl.y - offset.y, &eis); float ad = boundmin(ISQRT2 * (osdbox.tr.y + other.x - other.y - sdbox.bl.y - offset.x + offset.y) + 1, tr.y - offset.y, tr.x - offset.x, &ead); float id = boundmin(ISQRT2 * (osdbox.bl.y + other.x - other.y - sdbox.tr.y - offset.x + offset.y) + 1, bl.y - offset.y, bl.x - offset.x, &eid);
if (eax < beste)
{ res = Position(ax, 0); beste = eax; } if (eay < beste)
{ res = Position(0, ay); beste = eay; } if (eix < beste)
{ res = Position(ix, 0); beste = eix; } if (eiy < beste)
{ res = Position(0, iy); beste = eiy; } if (SQRT2 * (eas) < beste)
{ res = Position(as, ad); beste = SQRT2 * (eas); } if (SQRT2 * (eis) < beste)
{ res = Position(is, is); beste = SQRT2 * (eis); } if (SQRT2 * (ead) < beste)
{ res = Position(ad, ad); beste = SQRT2 * (ead); } if (SQRT2 * (eid) < beste)
{ res = Position(id, id); beste = SQRT2 * (eid); } return res;
} #endif
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.10Bemerkung:
(vorverarbeitet am 2026-09-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.