diff options
author | Sven Göthel <[email protected]> | 2024-01-12 05:30:27 +0100 |
---|---|---|
committer | Sven Göthel <[email protected]> | 2024-01-12 05:30:27 +0100 |
commit | 9c4e97a896e4ce2491ac38bfbf0c21a527548cb3 (patch) | |
tree | 9c0d4e6ed680b5f2dd7f40a9380c118487447c67 /src/jogl/classes/com/jogamp/math/geom/AABBox.java | |
parent | 76a74ca56e2708c967b3e5aafaa24eb9603bbb99 (diff) |
AABBox resize{Width, Height}(..): Positive argument shall always denote expansion
Diffstat (limited to 'src/jogl/classes/com/jogamp/math/geom/AABBox.java')
-rw-r--r-- | src/jogl/classes/com/jogamp/math/geom/AABBox.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/jogl/classes/com/jogamp/math/geom/AABBox.java b/src/jogl/classes/com/jogamp/math/geom/AABBox.java index 926f55aec..68a940ac9 100644 --- a/src/jogl/classes/com/jogamp/math/geom/AABBox.java +++ b/src/jogl/classes/com/jogamp/math/geom/AABBox.java @@ -212,14 +212,14 @@ public class AABBox { /** * Resize width of this AABBox with explicit left- and right delta values - * @param deltaLeft positive value will shrink width, otherwise expand width + * @param deltaLeft positive value will expand width, otherwise shrink width * @param deltaRight positive value will expand width, otherwise shrink width * @return this AABBox for chaining */ public final AABBox resizeWidth(final float deltaLeft, final float deltaRight) { boolean mod = false; if( !FloatUtil.isZero(deltaLeft) ) { - low.setX( low.x() + deltaLeft ); + low.setX( low.x() - deltaLeft ); mod = true; } if( !FloatUtil.isZero(deltaRight) ) { @@ -234,14 +234,14 @@ public class AABBox { /** * Resize height of this AABBox with explicit bottom- and top delta values - * @param deltaBottom positive value will shrink height, otherwise expand height + * @param deltaBottom positive value will expand height, otherwise shrink height * @param deltaTop positive value will expand height, otherwise shrink height * @return this AABBox for chaining */ public final AABBox resizeHeight(final float deltaBottom, final float deltaTop) { boolean mod = false; if( !FloatUtil.isZero(deltaBottom) ) { - low.setY( low.y() + deltaBottom ); + low.setY( low.y() - deltaBottom ); mod = true; } if( !FloatUtil.isZero(deltaTop) ) { |