Skip to content

Commit

Permalink
Float3: add the set() method
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Jul 6, 2024
1 parent e4472b3 commit 5ad6a5d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/main/java/com/github/stephengold/joltjni/Float3.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,19 @@ public float get(int index) {
"index must be either 0, 1 or 2");
}
}

/**
* Set all 3 components to specified values.
*
* @param x the desired X component
* @param y the desired Y component
* @param z the desired Z component
*/
public void set(float x, float y, float z) {
this.x = x;
this.y = y;
this.z = z;
}
// *************************************************************************
// Object methods

Expand Down

0 comments on commit 5ad6a5d

Please sign in to comment.