OSDN Git Service

[release] 0.3
authorbadlogicgames <badlogicgames@6c4fd544-2939-11df-bb46-9574ba5d0bfa>
Fri, 9 Apr 2010 14:30:14 +0000 (14:30 +0000)
committerbadlogicgames <badlogicgames@6c4fd544-2939-11df-bb46-9574ba5d0bfa>
Fri, 9 Apr 2010 14:30:14 +0000 (14:30 +0000)
gdx/dist/README
gdx/dist/gdx-0.22-sources.jar [deleted file]
gdx/dist/gdx-0.22.jar [deleted file]
gdx/dist/gdx-0.3-sources.jar [new file with mode: 0644]
gdx/dist/gdx-0.3.jar [new file with mode: 0644]
gdx/dist/gdx.dll
gdx/src/com/badlogic/gdx/math/Vector2.java

index e782d38..f98fd66 100644 (file)
@@ -17,8 +17,8 @@ gdx-helloworld
        - >libandroidgl20.so\r
        - >libgdx.so\r
     -> desktop-dependencies.jar\r
-    -> gdx-0.21sources.jar\r
-    -> gdx-0.21.jar\r
+    -> gdx-0.3-sources.jar\r
+    -> gdx-0.3.jar\r
     -> gdx.dll\r
     -> libgdx.so\r
     -> README\r
@@ -95,8 +95,8 @@ gdx-helloworld-android
     -> armeabi/\r
        -> libandroidgl20.so\r
        -> libgdx.so\r
-    -> gdx-0.21.jar\r
-    -> gdx-0.21-sources.jar\r
+    -> gdx-0.3.jar\r
+    -> gdx-0.3-sources.jar\r
     -> gdx.dll\r
     -> desktop-dependencies.jar\r
     -> libgdx.so\r
@@ -106,7 +106,7 @@ gdx-helloworld-android
  -> default.properties\r
  \r
  Go to the properties of the Android project and select "Java Build Path" again. Add the gdx-helloworld \r
-project in the project tab and the gdx-0.11.jar in the Libraries tab. You don't have to add the other\r
+project in the project tab and the gdx-0.3.jar in the Libraries tab. You don't have to add the other\r
 jars as those are only needed for the desktop Java version. \r
 \r
 Now open the GDXHelloWorld.java file and paste the following code in:\r
diff --git a/gdx/dist/gdx-0.22-sources.jar b/gdx/dist/gdx-0.22-sources.jar
deleted file mode 100644 (file)
index 1be6458..0000000
Binary files a/gdx/dist/gdx-0.22-sources.jar and /dev/null differ
diff --git a/gdx/dist/gdx-0.22.jar b/gdx/dist/gdx-0.22.jar
deleted file mode 100644 (file)
index c6ca1a9..0000000
Binary files a/gdx/dist/gdx-0.22.jar and /dev/null differ
diff --git a/gdx/dist/gdx-0.3-sources.jar b/gdx/dist/gdx-0.3-sources.jar
new file mode 100644 (file)
index 0000000..81119bf
Binary files /dev/null and b/gdx/dist/gdx-0.3-sources.jar differ
diff --git a/gdx/dist/gdx-0.3.jar b/gdx/dist/gdx-0.3.jar
new file mode 100644 (file)
index 0000000..956b8aa
Binary files /dev/null and b/gdx/dist/gdx-0.3.jar differ
index 85f6be8..ca354a1 100644 (file)
Binary files a/gdx/dist/gdx.dll and b/gdx/dist/gdx.dll differ
index a15dad4..698cc38 100644 (file)
@@ -24,6 +24,9 @@ package com.badlogic.gdx.math;
  */\r
 public final class Vector2 \r
 {\r
+       /** static temporary vector **/\r
+       private final static Vector2 tmp = new Vector2();\r
+       \r
        /** the x-component of this vector **/\r
        public float x;\r
        /** the y-component of this vector **/\r
@@ -224,10 +227,18 @@ public final class Vector2
         * @param y The y-component of the other vector\r
         * @return This vector for chaining\r
         */\r
-       public Vector3 sub(float x, float y) \r
+       public Vector2 sub(float x, float y) \r
        {\r
                this.x -= x;\r
                this.y -= y;\r
-               return null;\r
+               return this;\r
+       }\r
+       \r
+       /**      \r
+        * @return a temporary copy of this vector. Use with care as this is backed by a single static Vector2 instance. v1.tmp().add( v2.tmp() ) will not work!\r
+        */\r
+       public Vector2 tmp( )\r
+       {\r
+               return tmp.set(this);\r
        }\r
 }\r