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/Vec3d.java | |
parent | 9fe460aecf8509c8305416bb9d77aadf6165c677 (diff) |
Vec[234][ifd]: Add toArray(..) method
Diffstat (limited to 'src/jogl/classes/com/jogamp/math/Vec3d.java')
-rw-r--r-- | src/jogl/classes/com/jogamp/math/Vec3d.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/math/Vec3d.java b/src/jogl/classes/com/jogamp/math/Vec3d.java index 7fb4477e0..0b66fe852 100644 --- a/src/jogl/classes/com/jogamp/math/Vec3d.java +++ b/src/jogl/classes/com/jogamp/math/Vec3d.java @@ -108,6 +108,14 @@ public final class Vec3d { return this; } + /** xyz[0..2] = this.{x, y, z}, returns this. */ + public Vec3d toArray(final double[/*3*/] xyz) { + xyz[0] = this.x; + xyz[1] = this.y; + xyz[2] = this.z; + return this; + } + /** Sets the ith component, 0 <= i < 3 */ public void set(final int i, final double val) { switch (i) { |