aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/math/Vec2f.java
diff options
context:
space:
mode:
authorSven Göthel <[email protected]>2024-01-31 11:58:08 +0100
committerSven Göthel <[email protected]>2024-01-31 11:58:08 +0100
commit8d03e7e0b79cf5bd70fa45f524abb236787303ad (patch)
tree08f60d8873779c13128f2e53681959d5373b9012 /src/jogl/classes/com/jogamp/math/Vec2f.java
parent5cf0d370dbc2b1f59102522d40f4875f7d77b1f7 (diff)
Add Vec2f.set(Vec2i) and Vec2f(Vec2i); Add Texture.set(..) allowing a pending setup/update of texture and image dimensions
Diffstat (limited to 'src/jogl/classes/com/jogamp/math/Vec2f.java')
-rw-r--r--src/jogl/classes/com/jogamp/math/Vec2f.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/math/Vec2f.java b/src/jogl/classes/com/jogamp/math/Vec2f.java
index 547f63a05..94a2ffc62 100644
--- a/src/jogl/classes/com/jogamp/math/Vec2f.java
+++ b/src/jogl/classes/com/jogamp/math/Vec2f.java
@@ -48,6 +48,10 @@ public final class Vec2f {
set(o);
}
+ public Vec2f(final Vec2i o) {
+ set(o);
+ }
+
/** Creating new Vec2f using Vec3f, dropping z. */
public Vec2f(final Vec3f o) {
set(o);
@@ -71,6 +75,12 @@ public final class Vec2f {
this.y = o.y;
}
+ /** this = o (int -> float), returns this. */
+ public void set(final Vec2i o) {
+ this.x = o.x();
+ this.y = o.y();
+ }
+
/** this = o while dropping z, returns this. */
public void set(final Vec3f o) {
this.x = o.x();