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/Vec2i.java | |
parent | 9fe460aecf8509c8305416bb9d77aadf6165c677 (diff) |
Vec[234][ifd]: Add toArray(..) method
Diffstat (limited to 'src/jogl/classes/com/jogamp/math/Vec2i.java')
-rw-r--r-- | src/jogl/classes/com/jogamp/math/Vec2i.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/math/Vec2i.java b/src/jogl/classes/com/jogamp/math/Vec2i.java index 73906120d..49a089ec5 100644 --- a/src/jogl/classes/com/jogamp/math/Vec2i.java +++ b/src/jogl/classes/com/jogamp/math/Vec2i.java @@ -72,6 +72,13 @@ public final class Vec2i { return this; } + /** xy[0..1] = this.{x, y}, returns this. */ + public Vec2i toArray(final int[/*2*/] xy) { + xy[0] = this.x; + xy[1] = this.y; + return this; + } + /** xy = this, returns xy. */ public int[] get(final int[/*2*/] xy) { xy[0] = this.x; |