From 2a22402907858d08a46e8a52154b87c43bfef548 Mon Sep 17 00:00:00 2001 From: stephengold Date: Sun, 23 Feb 2025 22:27:15 -0800 Subject: [PATCH] RVec3: rename addLocal() and eliminate chaining --- .../com/github/stephengold/joltjni/RVec3.java | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/github/stephengold/joltjni/RVec3.java b/src/main/java/com/github/stephengold/joltjni/RVec3.java index f7c129eb..3845062d 100644 --- a/src/main/java/com/github/stephengold/joltjni/RVec3.java +++ b/src/main/java/com/github/stephengold/joltjni/RVec3.java @@ -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; } /**