correctTopRight(points) {
			// A..D
			// |  :
			// B--C
			let pointA = points[0];
			let pointB = points[1];
			let pointC = points[2];
			let pointD = points[3];
			// shift points for safe transition detection.
			let trTop = this.transitionsBetween(pointA, pointD);
			let trRight = this.transitionsBetween(pointB, pointD);
			let pointAs = Detector$1.shiftPoint(pointA, pointB, (trRight + 1) * 4);
			let pointCs = Detector$1.shiftPoint(pointC, pointB, (trTop + 1) * 4);
			trTop = this.transitionsBetween(pointAs, pointD);
			trRight = this.transitionsBetween(pointCs, pointD);
			let candidate1 = new ResultPoint(pointD.getX() + (pointC.getX() - pointB.getX()) / (trTop + 1), pointD.getY() + (pointC.getY() - pointB.getY()) / (trTop + 1));
			let candidate2 = new ResultPoint(pointD.getX() + (pointA.getX() - pointB.getX()) / (trRight + 1), pointD.getY() + (pointA.getY() - pointB.getY()) / (trRight + 1));
			if (!this.isValid(candidate1)) {
				if (this.isValid(candidate2)) {
					return candidate2;
				}
				return null;
			}
			if (!this.isValid(candidate2)) {
				return candidate1;
			}
			let sumc1 = this.transitionsBetween(pointAs, candidate1) + this.transitionsBetween(pointCs, candidate1);
			let sumc2 = this.transitionsBetween(pointAs, candidate2) + this.transitionsBetween(pointCs, candidate2);
			if (sumc1 > sumc2) {
				return candidate1;
			}
			else {
				return candidate2;
			}
		}
Calculates the corner position of the white top right module.