MCPcopy Create free account
hub / github.com/Card-Forge/forge / getMidpoint

Method getMidpoint

forge-gui-mobile/src/forge/util/Utils.java:84–89  ·  view source on GitHub ↗
(Vector2 p1, Vector2 p2)

Source from the content-addressed store, hash-verified

82 }
83
84 public static Vector2 getMidpoint(Vector2 p1, Vector2 p2) {
85 Vector2 result = new Vector2();
86 result.x = (p1.x + p2.x) / 2;
87 result.y = (p1.y + p2.y) / 2;
88 return result;
89 }
90
91 public static Vector2 getArbitaryPoint(float x1, float y1, float x2, float y2, float percentage) {
92 Vector2 result = new Vector2();

Callers 2

touchDownMethod · 0.95
getIntersectionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected