Skip to content

Commit

Permalink
Remove unintended partial newer not working files from jts transpilation
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornharrtell committed Aug 23, 2023
1 parent ad5af47 commit 0ae8b18
Show file tree
Hide file tree
Showing 52 changed files with 78 additions and 5,152 deletions.
47 changes: 0 additions & 47 deletions src/org/locationtech/jts/algorithm/PolygonNodeTopology.js

This file was deleted.

116 changes: 58 additions & 58 deletions src/org/locationtech/jts/algorithm/RobustDeterminant.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ export default class RobustDeterminant {
return sign

else
if (x2 > 0)
return sign
else
return -sign
if (x2 > 0)
return sign
else
return -sign



Expand All @@ -37,10 +37,10 @@ export default class RobustDeterminant {
return -sign

else
if (x1 > 0)
return -sign
else
return sign
if (x1 > 0)
return -sign
else
return sign



Expand All @@ -58,48 +58,48 @@ export default class RobustDeterminant {
y2 = swap
}
} else
if (y1 <= -y2) {
sign = -sign
x2 = -x2
y2 = -y2
} else {
swap = x1
x1 = -x2
x2 = swap
swap = y1
y1 = -y2
y2 = swap
}
} else
if (0.0 < y2) {
if (-y1 <= y2) {
sign = -sign
x1 = -x1
y1 = -y1
} else {
swap = -x1
x1 = x2
x2 = swap
swap = -y1
y1 = y2
y2 = swap
}
if (y1 <= -y2) {
sign = -sign
x2 = -x2
y2 = -y2
} else {
swap = x1
x1 = -x2
x2 = swap
swap = y1
y1 = -y2
y2 = swap
}
} else
if (y1 >= y2) {
x1 = -x1
y1 = -y1
x2 = -x2
y2 = -y2
if (0.0 < y2) {
if (-y1 <= y2) {
sign = -sign
x1 = -x1
y1 = -y1
} else {
swap = -x1
x1 = x2
x2 = swap
swap = -y1
y1 = y2
y2 = swap
}
} else
if (y1 >= y2) {
x1 = -x1
y1 = -y1
x2 = -x2
y2 = -y2

} else {
sign = -sign
swap = -x1
x1 = -x2
x2 = swap
swap = -y1
y1 = -y2
y2 = swap
}
} else {
sign = -sign
swap = -x1
x1 = -x2
x2 = swap
swap = -y1
y1 = -y2
y2 = swap
}


if (0.0 < x1) {
Expand All @@ -112,17 +112,17 @@ export default class RobustDeterminant {
else
return sign
} else
if (0.0 < x2) {
return -sign
} else
if (x1 >= x2) {
sign = -sign
x1 = -x1
x2 = -x2
if (0.0 < x2) {
return -sign
} else
if (x1 >= x2) {
sign = -sign
x1 = -x1
x2 = -x2

} else {
return -sign
}
} else {
return -sign
}


while (true) {
Expand Down
4 changes: 2 additions & 2 deletions src/org/locationtech/jts/geomgraph/Quadrant.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ export default class Quadrant {
if (dx >= 0.0)
if (dy >= 0.0) return Quadrant.NE; else return Quadrant.SE
else
if (dy >= 0.0) return Quadrant.NW; else return Quadrant.SW
if (dy >= 0.0) return Quadrant.NW; else return Quadrant.SW

} else if (arguments[0] instanceof Coordinate && arguments[1] instanceof Coordinate) {
const p0 = arguments[0], p1 = arguments[1]
if (p1.x === p0.x && p1.y === p0.y) throw new IllegalArgumentException('Cannot compute the quadrant for two identical points ' + p0)
if (p1.x >= p0.x)
if (p1.y >= p0.y) return Quadrant.NE; else return Quadrant.SE
else
if (p1.y >= p0.y) return Quadrant.NW; else return Quadrant.SW
if (p1.y >= p0.y) return Quadrant.NW; else return Quadrant.SW

}
}
Expand Down
10 changes: 5 additions & 5 deletions src/org/locationtech/jts/noding/Octant.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ export default class Octant {
if (dy >= 0)
if (adx >= ady) return 0; else return 1
else
if (adx >= ady) return 7; else return 6
if (adx >= ady) return 7; else return 6

else
if (dy >= 0)
if (adx >= ady) return 3; else return 2
else
if (adx >= ady) return 4; else return 5
if (dy >= 0)
if (adx >= ady) return 3; else return 2
else
if (adx >= ady) return 4; else return 5


} else if (arguments[0] instanceof Coordinate && arguments[1] instanceof Coordinate) {
Expand Down
8 changes: 4 additions & 4 deletions src/org/locationtech/jts/noding/SegmentStringDissolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ export default class SegmentStringDissolver {
if (existing === null) {
this.add(oca, segString)
} else
if (this._merger !== null) {
const isSameOrientation = CoordinateArrays.equals(existing.getCoordinates(), segString.getCoordinates())
this._merger.merge(existing, segString, isSameOrientation)
}
if (this._merger !== null) {
const isSameOrientation = CoordinateArrays.equals(existing.getCoordinates(), segString.getCoordinates())
this._merger.merge(existing, segString, isSameOrientation)
}

}
}
Expand Down
Loading

0 comments on commit 0ae8b18

Please sign in to comment.