Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / swingjs / j2s / jssun / awt / geom / Crossings.js
index 8458d05..7a95cf4 100644 (file)
-Clazz.declarePackage ("jssun.awt.geom");\r
-Clazz.load (["java.util.Vector"], "jssun.awt.geom.Crossings", ["jssun.awt.geom.Curve"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.limit = 0;\r
-this.yranges = null;\r
-this.xlo = 0;\r
-this.ylo = 0;\r
-this.xhi = 0;\r
-this.yhi = 0;\r
-this.tmp = null;\r
-Clazz.instantialize (this, arguments);\r
-}, jssun.awt.geom, "Crossings");\r
-Clazz.prepareFields (c$, function () {\r
-this.yranges =  Clazz.newDoubleArray (10, 0);\r
-this.tmp =  new java.util.Vector ();\r
-});\r
-Clazz.makeConstructor (c$, \r
-function (xlo, ylo, xhi, yhi) {\r
-this.xlo = xlo;\r
-this.ylo = ylo;\r
-this.xhi = xhi;\r
-this.yhi = yhi;\r
-}, "~N,~N,~N,~N");\r
-Clazz.defineMethod (c$, "getXLo", \r
-function () {\r
-return this.xlo;\r
-});\r
-Clazz.defineMethod (c$, "getYLo", \r
-function () {\r
-return this.ylo;\r
-});\r
-Clazz.defineMethod (c$, "getXHi", \r
-function () {\r
-return this.xhi;\r
-});\r
-Clazz.defineMethod (c$, "getYHi", \r
-function () {\r
-return this.yhi;\r
-});\r
-Clazz.defineMethod (c$, "print", \r
-function () {\r
-System.out.println ("Crossings [");\r
-System.out.println ("  bounds = [" + this.ylo + ", " + this.yhi + "]");\r
-for (var i = 0; i < this.limit; i += 2) {\r
-System.out.println ("  [" + this.yranges[i] + ", " + this.yranges[i + 1] + "]");\r
-}\r
-System.out.println ("]");\r
-});\r
-Clazz.defineMethod (c$, "isEmpty", \r
-function () {\r
-return (this.limit == 0);\r
-});\r
-c$.findCrossings = Clazz.defineMethod (c$, "findCrossings", \r
-function (curves, xlo, ylo, xhi, yhi) {\r
-var cross =  new jssun.awt.geom.Crossings.EvenOdd (xlo, ylo, xhi, yhi);\r
-var enum_ = curves.elements ();\r
-while (enum_.hasMoreElements ()) {\r
-var c = enum_.nextElement ();\r
-if (c.accumulateCrossings (cross)) {\r
-return null;\r
-}}\r
-return cross;\r
-}, "java.util.Vector,~N,~N,~N,~N");\r
-Clazz.defineMethod (c$, "accumulateLine", \r
-function (x0, y0, x1, y1) {\r
-if (y0 <= y1) {\r
-return this.accumulateLine (x0, y0, x1, y1, 1);\r
-} else {\r
-return this.accumulateLine (x1, y1, x0, y0, -1);\r
-}}, "~N,~N,~N,~N");\r
-Clazz.defineMethod (c$, "accumulateLine", \r
-function (x0, y0, x1, y1, direction) {\r
-if (this.yhi <= y0 || this.ylo >= y1) {\r
-return false;\r
-}if (x0 >= this.xhi && x1 >= this.xhi) {\r
-return false;\r
-}if (y0 == y1) {\r
-return (x0 >= this.xlo || x1 >= this.xlo);\r
-}var xstart;\r
-var ystart;\r
-var xend;\r
-var yend;\r
-var dx = (x1 - x0);\r
-var dy = (y1 - y0);\r
-if (y0 < this.ylo) {\r
-xstart = x0 + (this.ylo - y0) * dx / dy;\r
-ystart = this.ylo;\r
-} else {\r
-xstart = x0;\r
-ystart = y0;\r
-}if (this.yhi < y1) {\r
-xend = x0 + (this.yhi - y0) * dx / dy;\r
-yend = this.yhi;\r
-} else {\r
-xend = x1;\r
-yend = y1;\r
-}if (xstart >= this.xhi && xend >= this.xhi) {\r
-return false;\r
-}if (xstart > this.xlo || xend > this.xlo) {\r
-return true;\r
-}this.record (ystart, yend, direction);\r
-return false;\r
-}, "~N,~N,~N,~N,~N");\r
-Clazz.defineMethod (c$, "accumulateQuad", \r
-function (x0, y0, coords) {\r
-if (y0 < this.ylo && coords[1] < this.ylo && coords[3] < this.ylo) {\r
-return false;\r
-}if (y0 > this.yhi && coords[1] > this.yhi && coords[3] > this.yhi) {\r
-return false;\r
-}if (x0 > this.xhi && coords[0] > this.xhi && coords[2] > this.xhi) {\r
-return false;\r
-}if (x0 < this.xlo && coords[0] < this.xlo && coords[2] < this.xlo) {\r
-if (y0 < coords[3]) {\r
-this.record (Math.max (y0, this.ylo), Math.min (coords[3], this.yhi), 1);\r
-} else if (y0 > coords[3]) {\r
-this.record (Math.max (coords[3], this.ylo), Math.min (y0, this.yhi), -1);\r
-}return false;\r
-}jssun.awt.geom.Curve.insertQuad (this.tmp, x0, y0, coords);\r
-var enum_ = this.tmp.elements ();\r
-while (enum_.hasMoreElements ()) {\r
-var c = enum_.nextElement ();\r
-if (c.accumulateCrossings (this)) {\r
-return true;\r
-}}\r
-this.tmp.clear ();\r
-return false;\r
-}, "~N,~N,~A");\r
-Clazz.defineMethod (c$, "accumulateCubic", \r
-function (x0, y0, coords) {\r
-if (y0 < this.ylo && coords[1] < this.ylo && coords[3] < this.ylo && coords[5] < this.ylo) {\r
-return false;\r
-}if (y0 > this.yhi && coords[1] > this.yhi && coords[3] > this.yhi && coords[5] > this.yhi) {\r
-return false;\r
-}if (x0 > this.xhi && coords[0] > this.xhi && coords[2] > this.xhi && coords[4] > this.xhi) {\r
-return false;\r
-}if (x0 < this.xlo && coords[0] < this.xlo && coords[2] < this.xlo && coords[4] < this.xlo) {\r
-if (y0 <= coords[5]) {\r
-this.record (Math.max (y0, this.ylo), Math.min (coords[5], this.yhi), 1);\r
-} else {\r
-this.record (Math.max (coords[5], this.ylo), Math.min (y0, this.yhi), -1);\r
-}return false;\r
-}jssun.awt.geom.Curve.insertCubic (this.tmp, x0, y0, coords);\r
-var enum_ = this.tmp.elements ();\r
-while (enum_.hasMoreElements ()) {\r
-var c = enum_.nextElement ();\r
-if (c.accumulateCrossings (this)) {\r
-return true;\r
-}}\r
-this.tmp.clear ();\r
-return false;\r
-}, "~N,~N,~A");\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.declareType (jssun.awt.geom.Crossings, "EvenOdd", jssun.awt.geom.Crossings);\r
-Clazz.overrideMethod (c$, "covers", \r
-function (a, b) {\r
-return (this.limit == 2 && this.yranges[0] <= a && this.yranges[1] >= b);\r
-}, "~N,~N");\r
-Clazz.overrideMethod (c$, "record", \r
-function (a, b, c) {\r
-if (a >= b) {\r
-return;\r
-}var d = 0;\r
-while (d < this.limit && a > this.yranges[d + 1]) {\r
-d += 2;\r
-}\r
-var e = d;\r
-while (d < this.limit) {\r
-var f = this.yranges[d++];\r
-var g = this.yranges[d++];\r
-if (b < f) {\r
-this.yranges[e++] = a;\r
-this.yranges[e++] = b;\r
-a = f;\r
-b = g;\r
-continue;\r
-}var h;\r
-var i;\r
-var j;\r
-var k;\r
-if (a < f) {\r
-h = a;\r
-i = f;\r
-} else {\r
-h = f;\r
-i = a;\r
-}if (b < g) {\r
-j = b;\r
-k = g;\r
-} else {\r
-j = g;\r
-k = b;\r
-}if (i == j) {\r
-a = h;\r
-b = k;\r
-} else {\r
-if (i > j) {\r
-a = j;\r
-j = i;\r
-i = a;\r
-}if (h != i) {\r
-this.yranges[e++] = h;\r
-this.yranges[e++] = i;\r
-}a = j;\r
-b = k;\r
-}if (a >= b) {\r
-break;\r
-}}\r
-if (e < d && d < this.limit) {\r
-System.arraycopy (this.yranges, d, this.yranges, e, this.limit - d);\r
-}e += (this.limit - d);\r
-if (a < b) {\r
-if (e >= this.yranges.length) {\r
-var f =  Clazz.newDoubleArray (e + 10, 0);\r
-System.arraycopy (this.yranges, 0, f, 0, e);\r
-this.yranges = f;\r
-}this.yranges[e++] = a;\r
-this.yranges[e++] = b;\r
-}this.limit = e;\r
-}, "~N,~N,~N");\r
-c$ = Clazz.p0p ();\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.crosscounts = null;\r
-Clazz.instantialize (this, arguments);\r
-}, jssun.awt.geom.Crossings, "NonZero", jssun.awt.geom.Crossings);\r
-Clazz.makeConstructor (c$, \r
-function (a, b, c, d) {\r
-Clazz.superConstructor (this, jssun.awt.geom.Crossings.NonZero, [a, b, c, d]);\r
-this.crosscounts =  Clazz.newIntArray (Clazz.doubleToInt (this.yranges.length / 2), 0);\r
-}, "~N,~N,~N,~N");\r
-Clazz.overrideMethod (c$, "covers", \r
-function (a, b) {\r
-var c = 0;\r
-while (c < this.limit) {\r
-var d = this.yranges[c++];\r
-var e = this.yranges[c++];\r
-if (a >= e) {\r
-continue;\r
-}if (a < d) {\r
-return false;\r
-}if (b <= e) {\r
-return true;\r
-}a = e;\r
-}\r
-return (a >= b);\r
-}, "~N,~N");\r
-Clazz.defineMethod (c$, "remove", \r
-function (a) {\r
-this.limit -= 2;\r
-var b = this.limit - a;\r
-if (b > 0) {\r
-System.arraycopy (this.yranges, a + 2, this.yranges, a, b);\r
-System.arraycopy (this.crosscounts, Clazz.doubleToInt (a / 2) + 1, this.crosscounts, Clazz.doubleToInt (a / 2), Clazz.doubleToInt (b / 2));\r
-}}, "~N");\r
-Clazz.defineMethod (c$, "insert", \r
-function (a, b, c, d) {\r
-var e = this.limit - a;\r
-var f = this.yranges;\r
-var g = this.crosscounts;\r
-if (this.limit >= this.yranges.length) {\r
-this.yranges =  Clazz.newDoubleArray (this.limit + 10, 0);\r
-System.arraycopy (f, 0, this.yranges, 0, a);\r
-this.crosscounts =  Clazz.newIntArray (Clazz.doubleToInt ((this.limit + 10) / 2), 0);\r
-System.arraycopy (g, 0, this.crosscounts, 0, Clazz.doubleToInt (a / 2));\r
-}if (e > 0) {\r
-System.arraycopy (f, a, this.yranges, a + 2, e);\r
-System.arraycopy (g, Clazz.doubleToInt (a / 2), this.crosscounts, Clazz.doubleToInt (a / 2) + 1, Clazz.doubleToInt (e / 2));\r
-}this.yranges[a + 0] = b;\r
-this.yranges[a + 1] = c;\r
-this.crosscounts[Clazz.doubleToInt (a / 2)] = d;\r
-this.limit += 2;\r
-}, "~N,~N,~N,~N");\r
-Clazz.overrideMethod (c$, "record", \r
-function (a, b, c) {\r
-if (a >= b) {\r
-return;\r
-}var d = 0;\r
-while (d < this.limit && a > this.yranges[d + 1]) {\r
-d += 2;\r
-}\r
-if (d < this.limit) {\r
-var e = this.crosscounts[Clazz.doubleToInt (d / 2)];\r
-var f = this.yranges[d + 0];\r
-var g = this.yranges[d + 1];\r
-if (g == a && e == c) {\r
-if (d + 2 == this.limit) {\r
-this.yranges[d + 1] = b;\r
-return;\r
-}this.remove (d);\r
-a = f;\r
-e = this.crosscounts[Clazz.doubleToInt (d / 2)];\r
-f = this.yranges[d + 0];\r
-g = this.yranges[d + 1];\r
-}if (b < f) {\r
-this.insert (d, a, b, c);\r
-return;\r
-}if (b == f && e == c) {\r
-this.yranges[d] = a;\r
-return;\r
-}if (a < f) {\r
-this.insert (d, a, f, c);\r
-d += 2;\r
-a = f;\r
-} else if (f < a) {\r
-this.insert (d, f, a, e);\r
-d += 2;\r
-f = a;\r
-}var h = e + c;\r
-var i = Math.min (b, g);\r
-if (h == 0) {\r
-this.remove (d);\r
-} else {\r
-this.crosscounts[Clazz.doubleToInt (d / 2)] = h;\r
-this.yranges[d++] = a;\r
-this.yranges[d++] = i;\r
-}a = f = i;\r
-if (f < g) {\r
-this.insert (d, f, g, e);\r
-}}if (a < b) {\r
-this.insert (d, a, b, c);\r
-}}, "~N,~N,~N");\r
-c$ = Clazz.p0p ();\r
-});\r
+Clazz.declarePackage ("jssun.awt.geom");
+Clazz.load (["java.util.Vector"], "jssun.awt.geom.Crossings", ["jssun.awt.geom.Curve"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.limit = 0;
+this.yranges = null;
+this.xlo = 0;
+this.ylo = 0;
+this.xhi = 0;
+this.yhi = 0;
+this.tmp = null;
+Clazz.instantialize (this, arguments);
+}, jssun.awt.geom, "Crossings");
+Clazz.prepareFields (c$, function () {
+this.yranges =  Clazz.newDoubleArray (10, 0);
+this.tmp =  new java.util.Vector ();
+});
+Clazz.makeConstructor (c$, 
+function (xlo, ylo, xhi, yhi) {
+this.xlo = xlo;
+this.ylo = ylo;
+this.xhi = xhi;
+this.yhi = yhi;
+}, "~N,~N,~N,~N");
+Clazz.defineMethod (c$, "getXLo", 
+function () {
+return this.xlo;
+});
+Clazz.defineMethod (c$, "getYLo", 
+function () {
+return this.ylo;
+});
+Clazz.defineMethod (c$, "getXHi", 
+function () {
+return this.xhi;
+});
+Clazz.defineMethod (c$, "getYHi", 
+function () {
+return this.yhi;
+});
+Clazz.defineMethod (c$, "print", 
+function () {
+System.out.println ("Crossings [");
+System.out.println ("  bounds = [" + this.ylo + ", " + this.yhi + "]");
+for (var i = 0; i < this.limit; i += 2) {
+System.out.println ("  [" + this.yranges[i] + ", " + this.yranges[i + 1] + "]");
+}
+System.out.println ("]");
+});
+Clazz.defineMethod (c$, "isEmpty", 
+function () {
+return (this.limit == 0);
+});
+c$.findCrossings = Clazz.defineMethod (c$, "findCrossings", 
+function (curves, xlo, ylo, xhi, yhi) {
+var cross =  new jssun.awt.geom.Crossings.EvenOdd (xlo, ylo, xhi, yhi);
+var enum_ = curves.elements ();
+while (enum_.hasMoreElements ()) {
+var c = enum_.nextElement ();
+if (c.accumulateCrossings (cross)) {
+return null;
+}}
+return cross;
+}, "java.util.Vector,~N,~N,~N,~N");
+Clazz.defineMethod (c$, "accumulateLine", 
+function (x0, y0, x1, y1) {
+if (y0 <= y1) {
+return this.accumulateLine (x0, y0, x1, y1, 1);
+} else {
+return this.accumulateLine (x1, y1, x0, y0, -1);
+}}, "~N,~N,~N,~N");
+Clazz.defineMethod (c$, "accumulateLine", 
+function (x0, y0, x1, y1, direction) {
+if (this.yhi <= y0 || this.ylo >= y1) {
+return false;
+}if (x0 >= this.xhi && x1 >= this.xhi) {
+return false;
+}if (y0 == y1) {
+return (x0 >= this.xlo || x1 >= this.xlo);
+}var xstart;
+var ystart;
+var xend;
+var yend;
+var dx = (x1 - x0);
+var dy = (y1 - y0);
+if (y0 < this.ylo) {
+xstart = x0 + (this.ylo - y0) * dx / dy;
+ystart = this.ylo;
+} else {
+xstart = x0;
+ystart = y0;
+}if (this.yhi < y1) {
+xend = x0 + (this.yhi - y0) * dx / dy;
+yend = this.yhi;
+} else {
+xend = x1;
+yend = y1;
+}if (xstart >= this.xhi && xend >= this.xhi) {
+return false;
+}if (xstart > this.xlo || xend > this.xlo) {
+return true;
+}this.record (ystart, yend, direction);
+return false;
+}, "~N,~N,~N,~N,~N");
+Clazz.defineMethod (c$, "accumulateQuad", 
+function (x0, y0, coords) {
+if (y0 < this.ylo && coords[1] < this.ylo && coords[3] < this.ylo) {
+return false;
+}if (y0 > this.yhi && coords[1] > this.yhi && coords[3] > this.yhi) {
+return false;
+}if (x0 > this.xhi && coords[0] > this.xhi && coords[2] > this.xhi) {
+return false;
+}if (x0 < this.xlo && coords[0] < this.xlo && coords[2] < this.xlo) {
+if (y0 < coords[3]) {
+this.record (Math.max (y0, this.ylo), Math.min (coords[3], this.yhi), 1);
+} else if (y0 > coords[3]) {
+this.record (Math.max (coords[3], this.ylo), Math.min (y0, this.yhi), -1);
+}return false;
+}jssun.awt.geom.Curve.insertQuad (this.tmp, x0, y0, coords);
+var enum_ = this.tmp.elements ();
+while (enum_.hasMoreElements ()) {
+var c = enum_.nextElement ();
+if (c.accumulateCrossings (this)) {
+return true;
+}}
+this.tmp.clear ();
+return false;
+}, "~N,~N,~A");
+Clazz.defineMethod (c$, "accumulateCubic", 
+function (x0, y0, coords) {
+if (y0 < this.ylo && coords[1] < this.ylo && coords[3] < this.ylo && coords[5] < this.ylo) {
+return false;
+}if (y0 > this.yhi && coords[1] > this.yhi && coords[3] > this.yhi && coords[5] > this.yhi) {
+return false;
+}if (x0 > this.xhi && coords[0] > this.xhi && coords[2] > this.xhi && coords[4] > this.xhi) {
+return false;
+}if (x0 < this.xlo && coords[0] < this.xlo && coords[2] < this.xlo && coords[4] < this.xlo) {
+if (y0 <= coords[5]) {
+this.record (Math.max (y0, this.ylo), Math.min (coords[5], this.yhi), 1);
+} else {
+this.record (Math.max (coords[5], this.ylo), Math.min (y0, this.yhi), -1);
+}return false;
+}jssun.awt.geom.Curve.insertCubic (this.tmp, x0, y0, coords);
+var enum_ = this.tmp.elements ();
+while (enum_.hasMoreElements ()) {
+var c = enum_.nextElement ();
+if (c.accumulateCrossings (this)) {
+return true;
+}}
+this.tmp.clear ();
+return false;
+}, "~N,~N,~A");
+Clazz.pu$h(self.c$);
+c$ = Clazz.declareType (jssun.awt.geom.Crossings, "EvenOdd", jssun.awt.geom.Crossings);
+Clazz.overrideMethod (c$, "covers", 
+function (a, b) {
+return (this.limit == 2 && this.yranges[0] <= a && this.yranges[1] >= b);
+}, "~N,~N");
+Clazz.overrideMethod (c$, "record", 
+function (a, b, c) {
+if (a >= b) {
+return;
+}var d = 0;
+while (d < this.limit && a > this.yranges[d + 1]) {
+d += 2;
+}
+var e = d;
+while (d < this.limit) {
+var f = this.yranges[d++];
+var g = this.yranges[d++];
+if (b < f) {
+this.yranges[e++] = a;
+this.yranges[e++] = b;
+a = f;
+b = g;
+continue;
+}var h;
+var i;
+var j;
+var k;
+if (a < f) {
+h = a;
+i = f;
+} else {
+h = f;
+i = a;
+}if (b < g) {
+j = b;
+k = g;
+} else {
+j = g;
+k = b;
+}if (i == j) {
+a = h;
+b = k;
+} else {
+if (i > j) {
+a = j;
+j = i;
+i = a;
+}if (h != i) {
+this.yranges[e++] = h;
+this.yranges[e++] = i;
+}a = j;
+b = k;
+}if (a >= b) {
+break;
+}}
+if (e < d && d < this.limit) {
+System.arraycopy (this.yranges, d, this.yranges, e, this.limit - d);
+}e += (this.limit - d);
+if (a < b) {
+if (e >= this.yranges.length) {
+var f =  Clazz.newDoubleArray (e + 10, 0);
+System.arraycopy (this.yranges, 0, f, 0, e);
+this.yranges = f;
+}this.yranges[e++] = a;
+this.yranges[e++] = b;
+}this.limit = e;
+}, "~N,~N,~N");
+c$ = Clazz.p0p ();
+Clazz.pu$h(self.c$);
+c$ = Clazz.decorateAsClass (function () {
+this.crosscounts = null;
+Clazz.instantialize (this, arguments);
+}, jssun.awt.geom.Crossings, "NonZero", jssun.awt.geom.Crossings);
+Clazz.makeConstructor (c$, 
+function (a, b, c, d) {
+Clazz.superConstructor (this, jssun.awt.geom.Crossings.NonZero, [a, b, c, d]);
+this.crosscounts =  Clazz.newIntArray (Clazz.doubleToInt (this.yranges.length / 2), 0);
+}, "~N,~N,~N,~N");
+Clazz.overrideMethod (c$, "covers", 
+function (a, b) {
+var c = 0;
+while (c < this.limit) {
+var d = this.yranges[c++];
+var e = this.yranges[c++];
+if (a >= e) {
+continue;
+}if (a < d) {
+return false;
+}if (b <= e) {
+return true;
+}a = e;
+}
+return (a >= b);
+}, "~N,~N");
+Clazz.defineMethod (c$, "remove", 
+function (a) {
+this.limit -= 2;
+var b = this.limit - a;
+if (b > 0) {
+System.arraycopy (this.yranges, a + 2, this.yranges, a, b);
+System.arraycopy (this.crosscounts, Clazz.doubleToInt (a / 2) + 1, this.crosscounts, Clazz.doubleToInt (a / 2), Clazz.doubleToInt (b / 2));
+}}, "~N");
+Clazz.defineMethod (c$, "insert", 
+function (a, b, c, d) {
+var e = this.limit - a;
+var f = this.yranges;
+var g = this.crosscounts;
+if (this.limit >= this.yranges.length) {
+this.yranges =  Clazz.newDoubleArray (this.limit + 10, 0);
+System.arraycopy (f, 0, this.yranges, 0, a);
+this.crosscounts =  Clazz.newIntArray (Clazz.doubleToInt ((this.limit + 10) / 2), 0);
+System.arraycopy (g, 0, this.crosscounts, 0, Clazz.doubleToInt (a / 2));
+}if (e > 0) {
+System.arraycopy (f, a, this.yranges, a + 2, e);
+System.arraycopy (g, Clazz.doubleToInt (a / 2), this.crosscounts, Clazz.doubleToInt (a / 2) + 1, Clazz.doubleToInt (e / 2));
+}this.yranges[a + 0] = b;
+this.yranges[a + 1] = c;
+this.crosscounts[Clazz.doubleToInt (a / 2)] = d;
+this.limit += 2;
+}, "~N,~N,~N,~N");
+Clazz.overrideMethod (c$, "record", 
+function (a, b, c) {
+if (a >= b) {
+return;
+}var d = 0;
+while (d < this.limit && a > this.yranges[d + 1]) {
+d += 2;
+}
+if (d < this.limit) {
+var e = this.crosscounts[Clazz.doubleToInt (d / 2)];
+var f = this.yranges[d + 0];
+var g = this.yranges[d + 1];
+if (g == a && e == c) {
+if (d + 2 == this.limit) {
+this.yranges[d + 1] = b;
+return;
+}this.remove (d);
+a = f;
+e = this.crosscounts[Clazz.doubleToInt (d / 2)];
+f = this.yranges[d + 0];
+g = this.yranges[d + 1];
+}if (b < f) {
+this.insert (d, a, b, c);
+return;
+}if (b == f && e == c) {
+this.yranges[d] = a;
+return;
+}if (a < f) {
+this.insert (d, a, f, c);
+d += 2;
+a = f;
+} else if (f < a) {
+this.insert (d, f, a, e);
+d += 2;
+f = a;
+}var h = e + c;
+var i = Math.min (b, g);
+if (h == 0) {
+this.remove (d);
+} else {
+this.crosscounts[Clazz.doubleToInt (d / 2)] = h;
+this.yranges[d++] = a;
+this.yranges[d++] = i;
+}a = f = i;
+if (f < g) {
+this.insert (d, f, g, e);
+}}if (a < b) {
+this.insert (d, a, b, c);
+}}, "~N,~N,~N");
+c$ = Clazz.p0p ();
+});