aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/audio/windows/waveout/Vec3f.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-07-03 16:21:36 +0200
committerSven Gothel <[email protected]>2014-07-03 16:21:36 +0200
commit556d92b63555a085b25e32b1cd55afce24edd07a (patch)
tree6be2b02c62a77d5aba81ffbe34c46960608be163 /src/jogl/classes/com/jogamp/audio/windows/waveout/Vec3f.java
parenta90f4a51dffec3247278e3c683ed4462b1dd9ab5 (diff)
Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)
- Change non static accesses to static members using declaring type - Change indirect accesses to static members to direct accesses (accesses through subtypes) - Add final modifier to private fields - Add final modifier to method parameters - Add final modifier to local variables - Remove unnecessary casts - Remove unnecessary '$NON-NLS$' tags - Remove trailing white spaces on all lines
Diffstat (limited to 'src/jogl/classes/com/jogamp/audio/windows/waveout/Vec3f.java')
-rw-r--r--src/jogl/classes/com/jogamp/audio/windows/waveout/Vec3f.java58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/jogl/classes/com/jogamp/audio/windows/waveout/Vec3f.java b/src/jogl/classes/com/jogamp/audio/windows/waveout/Vec3f.java
index 79fb80169..831b25c91 100644
--- a/src/jogl/classes/com/jogamp/audio/windows/waveout/Vec3f.java
+++ b/src/jogl/classes/com/jogamp/audio/windows/waveout/Vec3f.java
@@ -48,11 +48,11 @@ class Vec3f {
public Vec3f() {}
- public Vec3f(Vec3f arg) {
+ public Vec3f(final Vec3f arg) {
set(arg);
}
- public Vec3f(float x, float y, float z) {
+ public Vec3f(final float x, final float y, final float z) {
set(x, y, z);
}
@@ -60,18 +60,18 @@ class Vec3f {
return new Vec3f(this);
}
- public void set(Vec3f arg) {
+ public void set(final Vec3f arg) {
set(arg.x, arg.y, arg.z);
}
- public void set(float x, float y, float z) {
+ public void set(final float x, final float y, final float z) {
this.x = x;
this.y = y;
this.z = z;
}
/** Sets the ith component, 0 <= i < 3 */
- public void set(int i, float val) {
+ public void set(final int i, final float val) {
switch (i) {
case 0: x = val; break;
case 1: y = val; break;
@@ -81,7 +81,7 @@ class Vec3f {
}
/** Gets the ith component, 0 <= i < 3 */
- public float get(int i) {
+ public float get(final int i) {
switch (i) {
case 0: return x;
case 1: return y;
@@ -94,11 +94,11 @@ class Vec3f {
public float y() { return y; }
public float z() { return z; }
- public void setX(float x) { this.x = x; }
- public void setY(float y) { this.y = y; }
- public void setZ(float z) { this.z = z; }
+ public void setX(final float x) { this.x = x; }
+ public void setY(final float y) { this.y = y; }
+ public void setZ(final float z) { this.z = z; }
- public float dot(Vec3f arg) {
+ public float dot(final Vec3f arg) {
return x * arg.x + y * arg.y + z * arg.z;
}
@@ -111,87 +111,87 @@ class Vec3f {
}
public void normalize() {
- float len = length();
+ final float len = length();
if (len == 0.0f) return;
scale(1.0f / len);
}
/** Returns this * val; creates new vector */
- public Vec3f times(float val) {
- Vec3f tmp = new Vec3f(this);
+ public Vec3f times(final float val) {
+ final Vec3f tmp = new Vec3f(this);
tmp.scale(val);
return tmp;
}
/** this = this * val */
- public void scale(float val) {
+ public void scale(final float val) {
x *= val;
y *= val;
z *= val;
}
/** Returns this + arg; creates new vector */
- public Vec3f plus(Vec3f arg) {
- Vec3f tmp = new Vec3f();
+ public Vec3f plus(final Vec3f arg) {
+ final Vec3f tmp = new Vec3f();
tmp.add(this, arg);
return tmp;
}
/** this = this + b */
- public void add(Vec3f b) {
+ public void add(final Vec3f b) {
add(this, b);
}
/** this = a + b */
- public void add(Vec3f a, Vec3f b) {
+ public void add(final Vec3f a, final Vec3f b) {
x = a.x + b.x;
y = a.y + b.y;
z = a.z + b.z;
}
/** Returns this + s * arg; creates new vector */
- public Vec3f addScaled(float s, Vec3f arg) {
- Vec3f tmp = new Vec3f();
+ public Vec3f addScaled(final float s, final Vec3f arg) {
+ final Vec3f tmp = new Vec3f();
tmp.addScaled(this, s, arg);
return tmp;
}
/** this = a + s * b */
- public void addScaled(Vec3f a, float s, Vec3f b) {
+ public void addScaled(final Vec3f a, final float s, final Vec3f b) {
x = a.x + s * b.x;
y = a.y + s * b.y;
z = a.z + s * b.z;
}
/** Returns this - arg; creates new vector */
- public Vec3f minus(Vec3f arg) {
- Vec3f tmp = new Vec3f();
+ public Vec3f minus(final Vec3f arg) {
+ final Vec3f tmp = new Vec3f();
tmp.sub(this, arg);
return tmp;
}
/** this = this - b */
- public void sub(Vec3f b) {
+ public void sub(final Vec3f b) {
sub(this, b);
}
/** this = a - b */
- public void sub(Vec3f a, Vec3f b) {
+ public void sub(final Vec3f a, final Vec3f b) {
x = a.x - b.x;
y = a.y - b.y;
z = a.z - b.z;
}
/** Returns this cross arg; creates new vector */
- public Vec3f cross(Vec3f arg) {
- Vec3f tmp = new Vec3f();
+ public Vec3f cross(final Vec3f arg) {
+ final Vec3f tmp = new Vec3f();
tmp.cross(this, arg);
return tmp;
}
/** this = a cross b. NOTE: "this" must be a different vector than
both a and b. */
- public void cross(Vec3f a, Vec3f b) {
+ public void cross(final Vec3f a, final Vec3f b) {
x = a.y * b.z - a.z * b.y;
y = a.z * b.x - a.x * b.z;
z = a.x * b.y - a.y * b.x;
@@ -200,7 +200,7 @@ class Vec3f {
/** Sets each component of this vector to the product of the
component with the corresponding component of the argument
vector. */
- public void componentMul(Vec3f arg) {
+ public void componentMul(final Vec3f arg) {
x *= arg.x;
y *= arg.y;
z *= arg.z;