Skip to content

Commit

Permalink
Remove 'new Vector3f()'
Browse files Browse the repository at this point in the history
Removed unnecessary instantiation of 'Vector3f' objects on setWidth() and setHeight() methods.
  • Loading branch information
fba-rio authored Oct 28, 2024
1 parent b34fed9 commit 1571b50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jme3-core/src/main/java/com/jme3/ui/Picture.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public float getWidth() {
*/
public void setWidth(float width){
this.width = width;
setLocalScale(new Vector3f(width, height, 1f));
setLocalScale(width, height, 1f);
}

/**
Expand All @@ -125,7 +125,7 @@ public void setWidth(float width){
*/
public void setHeight(float height){
this.height = height;
setLocalScale(new Vector3f(width, height, 1f));
setLocalScale(width, height, 1f);
}

/**
Expand Down

0 comments on commit 1571b50

Please sign in to comment.