MCPcopy Create free account
hub / github.com/Neop/mudmap2 / getExactCenter

Method getExactCenter

src/main/java/mudmap2/backend/Layer.java:152–157  ·  view source on GitHub ↗

Gets the exact center @return

()

Source from the content-addressed store, hash-verified

150 * @return
151 */
152 public Pair<Double, Double> getExactCenter(){
153 updateSizeCache();
154 double centerX = (double) (maxX + minX) / 2.0;
155 double centerY = (double) (maxY + minY) / 2.0;
156 return new Pair<>(centerX, centerY);
157 }
158
159 /**
160 * Gets the max x coordinate

Callers 2

testGetExactCenterMethod · 0.95
drawLayerMethod · 0.95

Calls 1

updateSizeCacheMethod · 0.95

Tested by 1

testGetExactCenterMethod · 0.76