aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/math/Vec2f.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com/jogamp/math/Vec2f.java')
-rw-r--r--src/jogl/classes/com/jogamp/math/Vec2f.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/math/Vec2f.java b/src/jogl/classes/com/jogamp/math/Vec2f.java
index 94a2ffc62..03820775d 100644
--- a/src/jogl/classes/com/jogamp/math/Vec2f.java
+++ b/src/jogl/classes/com/jogamp/math/Vec2f.java
@@ -100,6 +100,13 @@ public final class Vec2f {
return this;
}
+ /** xy[0..1] = this.{x, y}, returns this. */
+ public Vec2f toArray(final float[/*2*/] xy) {
+ xy[0] = this.x;
+ xy[1] = this.y;
+ return this;
+ }
+
/** Sets the ith component, 0 <= i < 2 */
public void set(final int i, final float val) {
switch (i) {