Skip to content

Commit

Permalink
RVec3: rename addLocal() and eliminate chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Feb 24, 2025
1 parent 855f85f commit 2a22402
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions src/main/java/com/github/stephengold/joltjni/RVec3.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,20 +110,16 @@ public RVec3(Vec3Arg vec) {
// new methods exposed

/**
* Adds specified amounts to the vector's components and returns the
* (modified) current instance.
* Add the specified offsets.
*
* @param addX the amount to add to the X component
* @param addY the amount to add to the Y component
* @param addZ the amount to add to the Z component
* @return the (modified) current instance, for chaining
* @param xOffset the amount to add to the X component
* @param yOffset the amount to add to the Y component
* @param zOffset the amount to add to the Z component
*/
public RVec3 addLocal(double addX, double addY, double addZ) {
this.xx += addX;
this.yy += addY;
this.zz += addZ;

return this;
public void addInPlace(double xOffset, double yOffset, double zOffset) {
this.xx += xOffset;
this.yy += yOffset;
this.zz += zOffset;
}

/**
Expand Down

0 comments on commit 2a22402

Please sign in to comment.