OSDN Git Service

Fixed triangleCentroid.
authorNathanSweet <nathan.sweet@gmail.com>
Sat, 7 Sep 2013 14:36:07 +0000 (16:36 +0200)
committerNathanSweet <nathan.sweet@gmail.com>
Sat, 7 Sep 2013 14:36:07 +0000 (16:36 +0200)
gdx/src/com/badlogic/gdx/math/Intersector.java

index 4e312b2..f54bca3 100644 (file)
@@ -98,7 +98,7 @@ public final class Intersector {
 
        public static Vector2 triangleCentroid (float x1, float y1, float x2, float y2, float x3, float y3, Vector2 centroid) {
                centroid.x = (x1 + x2 + x3) / 3;
-               centroid.y = (x1 + x2 + x3) / 3;
+               centroid.y = (y1 + y2 + y3) / 3;
                return centroid;
        }