Merge pull request #8679 from wallw-bits/fix-typecheck-triangulation

Type check fixes in Triangulation
This commit is contained in:
Tim Schaub
2018-09-20 04:20:29 -06:00
committed by GitHub
+4 -4
View File
@@ -237,12 +237,12 @@ class Triangulation {
if (this.targetProj_.isGlobal() && this.targetWorldWidth_) { if (this.targetProj_.isGlobal() && this.targetWorldWidth_) {
const targetQuadExtent = boundingExtent([a, b, c, d]); const targetQuadExtent = boundingExtent([a, b, c, d]);
const targetCoverageX = getWidth(targetQuadExtent) / this.targetWorldWidth_; const targetCoverageX = getWidth(targetQuadExtent) / this.targetWorldWidth_;
needsSubdivision |= needsSubdivision = targetCoverageX > MAX_TRIANGLE_WIDTH ||
targetCoverageX > MAX_TRIANGLE_WIDTH; needsSubdivision;
} }
if (!wrapsX && this.sourceProj_.isGlobal() && sourceCoverageX) { if (!wrapsX && this.sourceProj_.isGlobal() && sourceCoverageX) {
needsSubdivision |= needsSubdivision = sourceCoverageX > MAX_TRIANGLE_WIDTH ||
sourceCoverageX > MAX_TRIANGLE_WIDTH; needsSubdivision;
} }
} }