From 8d03e7e0b79cf5bd70fa45f524abb236787303ad Mon Sep 17 00:00:00 2001 From: Sven Göthel Date: Wed, 31 Jan 2024 11:58:08 +0100 Subject: Add Vec2f.set(Vec2i) and Vec2f(Vec2i); Add Texture.set(..) allowing a pending setup/update of texture and image dimensions --- src/jogl/classes/com/jogamp/math/Vec2f.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/jogl/classes/com/jogamp/math/Vec2f.java') 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(); -- cgit v1.2.3