aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/math/Vec2f.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-08-23 05:45:55 +0200
committerSven Gothel <[email protected]>2023-08-23 05:45:55 +0200
commitca49bcc03029156e52dfc29f886501548e9bf397 (patch)
tree69683761e9f9f50f1149357e72e9f2be473f2bba /src/jogl/classes/com/jogamp/opengl/math/Vec2f.java
parent64f7f17dc2db744106f1c71b576ef8e29a8854bd (diff)
Vec[234]f: Add scale(Vec[234]f s) variant for convenience
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/math/Vec2f.java')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/math/Vec2f.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/math/Vec2f.java b/src/jogl/classes/com/jogamp/opengl/math/Vec2f.java
index 47d1a78dc..d733aca5d 100644
--- a/src/jogl/classes/com/jogamp/opengl/math/Vec2f.java
+++ b/src/jogl/classes/com/jogamp/opengl/math/Vec2f.java
@@ -160,6 +160,9 @@ public final class Vec2f {
return this;
}
+ /** this = this * { s.x, s.y }, returns this. */
+ public Vec2f scale(final Vec2f s) { return scale(s.x, s.y); }
+
/** Returns this + arg; creates new vector */
public Vec2f plus(final Vec2f arg) {
return new Vec2f(this).add(arg);