diff options
author | Sven Göthel <[email protected]> | 2024-02-01 13:46:27 +0100 |
---|---|---|
committer | Sven Göthel <[email protected]> | 2024-02-01 13:46:27 +0100 |
commit | ca846bc67e6a074a182e97f29b3c34b90a12cac3 (patch) | |
tree | eddc1615a3947634c17ed8af071f76f51ccf06be /src/jogl/classes/com/jogamp/math/Vec2f.java | |
parent | 9fe460aecf8509c8305416bb9d77aadf6165c677 (diff) |
Vec[234][ifd]: Add toArray(..) method
Diffstat (limited to 'src/jogl/classes/com/jogamp/math/Vec2f.java')
-rw-r--r-- | src/jogl/classes/com/jogamp/math/Vec2f.java | 7 |
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) { |