From 5800faa58d9dfe0244d40049cca7aa2a8ee4c395 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Sat, 31 Dec 2011 14:50:54 -0800 Subject: vecmath: remove trailing whitespace from all files Signed-off-by: Harvey Harrison --- src/javax/vecmath/Tuple2f.java | 152 ++++++++++++++++++++--------------------- 1 file changed, 76 insertions(+), 76 deletions(-) (limited to 'src/javax/vecmath/Tuple2f.java') diff --git a/src/javax/vecmath/Tuple2f.java b/src/javax/vecmath/Tuple2f.java index 57d2703..f46bcaf 100644 --- a/src/javax/vecmath/Tuple2f.java +++ b/src/javax/vecmath/Tuple2f.java @@ -34,7 +34,7 @@ package javax.vecmath; import java.lang.Math; /** - * A generic 2-element tuple that is represented by single-precision + * A generic 2-element tuple that is represented by single-precision * floating point x,y coordinates. * */ @@ -121,7 +121,7 @@ public abstract class Tuple2f implements java.io.Serializable, Cloneable { /** - * Sets the value of this tuple from the 2 values specified in + * Sets the value of this tuple from the 2 values specified in * the array. * @param t the array of length 2 containing xy in order */ @@ -141,7 +141,7 @@ public abstract class Tuple2f implements java.io.Serializable, Cloneable { this.x = t1.x; this.y = t1.y; } - + /** * Sets the value of this tuple to the value of the Tuple2d argument. @@ -180,7 +180,7 @@ public abstract class Tuple2f implements java.io.Serializable, Cloneable { /** * Sets the value of this tuple to the vector sum of itself and tuple t1. * @param t1 the other tuple - */ + */ public final void add(Tuple2f t1) { this.x += t1.x; @@ -189,23 +189,23 @@ public abstract class Tuple2f implements java.io.Serializable, Cloneable { /** - * Sets the value of this tuple to the vector difference of - * tuple t1 and t2 (this = t1 - t2). + * Sets the value of this tuple to the vector difference of + * tuple t1 and t2 (this = t1 - t2). * @param t1 the first tuple * @param t2 the second tuple - */ + */ public final void sub(Tuple2f t1, Tuple2f t2) { this.x = t1.x - t2.x; this.y = t1.y - t2.y; - } + } /** * Sets the value of this tuple to the vector difference of * itself and tuple t1 (this = this - t1). * @param t1 the other tuple - */ + */ public final void sub(Tuple2f t1) { this.x -= t1.x; @@ -265,13 +265,13 @@ public abstract class Tuple2f implements java.io.Serializable, Cloneable { * @param s the scalar value * @param t1 the tuple to be multipled * @param t2 the tuple to be added - */ + */ public final void scaleAdd(float s, Tuple2f t1, Tuple2f t2) { - this.x = s*t1.x + t2.x; - this.y = s*t1.y + t2.y; - } - + this.x = s*t1.x + t2.x; + this.y = s*t1.y + t2.y; + } + /** * Sets the value of this tuple to the scalar multiplication @@ -294,7 +294,7 @@ public abstract class Tuple2f implements java.io.Serializable, Cloneable { * code value. Two objects with different data members may return the * same hash value, although this is not likely. * @return the integer hash code value - */ + */ public int hashCode() { long bits = 1L; bits = 31L * bits + (long)VecMathUtil.floatToIntBits(x); @@ -303,12 +303,12 @@ public abstract class Tuple2f implements java.io.Serializable, Cloneable { } - /** + /** * Returns true if all of the data members of Tuple2f t1 are * equal to the corresponding data members in this Tuple2f. * @param t1 the vector with which the comparison is made * @return true or false - */ + */ public boolean equals(Tuple2f t1) { try { @@ -318,13 +318,13 @@ public abstract class Tuple2f implements java.io.Serializable, Cloneable { } - /** + /** * Returns true if the Object t1 is of type Tuple2f and all of the * data members of t1 are equal to the corresponding data members in * this Tuple2f. * @param t1 the object with which the comparison is made * @return true or false - */ + */ public boolean equals(Object t1) { try { @@ -338,11 +338,11 @@ public abstract class Tuple2f implements java.io.Serializable, Cloneable { /** * Returns true if the L-infinite distance between this tuple - * and tuple t1 is less than or equal to the epsilon parameter, + * and tuple t1 is less than or equal to the epsilon parameter, * otherwise returns false. The L-infinite - * distance is equal to MAX[abs(x1-x2), abs(y1-y2)]. + * distance is equal to MAX[abs(x1-x2), abs(y1-y2)]. * @param t1 the tuple to be compared to this tuple - * @param epsilon the threshold value + * @param epsilon the threshold value * @return true or false */ public boolean epsilonEquals(Tuple2f t1, float epsilon) @@ -364,7 +364,7 @@ public abstract class Tuple2f implements java.io.Serializable, Cloneable { * Returns a string that contains the values of this Tuple2f. * The form is (x,y). * @return the String representation - */ + */ public String toString() { return("(" + this.x + ", " + this.y + ")"); @@ -372,15 +372,15 @@ public abstract class Tuple2f implements java.io.Serializable, Cloneable { /** - * Clamps the tuple parameter to the range [low, high] and - * places the values into this tuple. + * Clamps the tuple parameter to the range [low, high] and + * places the values into this tuple. * @param min the lowest value in the tuple after clamping - * @param max the highest value in the tuple after clamping + * @param max the highest value in the tuple after clamping * @param t the source tuple, which will not be modified */ public final void clamp(float min, float max, Tuple2f t) { - if( t.x > max ) { + if( t.x > max ) { x = max; } else if( t.x < min ){ x = min; @@ -388,7 +388,7 @@ public abstract class Tuple2f implements java.io.Serializable, Cloneable { x = t.x; } - if( t.y > max ) { + if( t.y > max ) { y = max; } else if( t.y < min ){ y = min; @@ -399,62 +399,62 @@ public abstract class Tuple2f implements java.io.Serializable, Cloneable { } - /** - * Clamps the minimum value of the tuple parameter to the min + /** + * Clamps the minimum value of the tuple parameter to the min * parameter and places the values into this tuple. - * @param min the lowest value in the tuple after clamping + * @param min the lowest value in the tuple after clamping * @param t the source tuple, which will not be modified - */ - public final void clampMin(float min, Tuple2f t) - { - if( t.x < min ) { + */ + public final void clampMin(float min, Tuple2f t) + { + if( t.x < min ) { x = min; } else { x = t.x; } - if( t.y < min ) { + if( t.y < min ) { y = min; } else { y = t.y; } - } + } - /** - * Clamps the maximum value of the tuple parameter to the max + /** + * Clamps the maximum value of the tuple parameter to the max * parameter and places the values into this tuple. - * @param max the highest value in the tuple after clamping + * @param max the highest value in the tuple after clamping * @param t the source tuple, which will not be modified - */ - public final void clampMax(float max, Tuple2f t) - { - if( t.x > max ) { + */ + public final void clampMax(float max, Tuple2f t) + { + if( t.x > max ) { x = max; - } else { + } else { x = t.x; } - + if( t.y > max ) { y = max; } else { y = t.y; } - } + } - /** - * Sets each component of the tuple parameter to its absolute + /** + * Sets each component of the tuple parameter to its absolute * value and places the modified values into this tuple. * @param t the source tuple, which will not be modified - */ + */ public final void absolute(Tuple2f t) { x = Math.abs(t.x); y = Math.abs(t.y); - } + } @@ -470,7 +470,7 @@ public abstract class Tuple2f implements java.io.Serializable, Cloneable { } else if( x < min ){ x = min; } - + if( y > max ) { y = max; } else if( y < min ){ @@ -479,24 +479,24 @@ public abstract class Tuple2f implements java.io.Serializable, Cloneable { } - + /** * Clamps the minimum value of this tuple to the min parameter. * @param min the lowest value in this tuple after clamping */ public final void clampMin(float min) - { + { if( x < min ) x=min; if( y < min ) y=min; - } - - + } + + /** * Clamps the maximum value of this tuple to the max parameter. * @param max the highest value in the tuple after clamping */ public final void clampMax(float max) - { + { if( x > max ) x=max; if( y > max ) y=max; } @@ -512,8 +512,8 @@ public abstract class Tuple2f implements java.io.Serializable, Cloneable { } - /** - * Linearly interpolates between tuples t1 and t2 and places the + /** + * Linearly interpolates between tuples t1 and t2 and places the * result into this tuple: this = (1-alpha)*t1 + alpha*t2. * @param t1 the first tuple * @param t2 the second tuple @@ -523,23 +523,23 @@ public abstract class Tuple2f implements java.io.Serializable, Cloneable { { this.x = (1-alpha)*t1.x + alpha*t2.x; this.y = (1-alpha)*t1.y + alpha*t2.y; - + } - /** - * Linearly interpolates between this tuple and tuple t1 and + /** + * Linearly interpolates between this tuple and tuple t1 and * places the result into this tuple: this = (1-alpha)*this + alpha*t1. * @param t1 the first tuple - * @param alpha the alpha interpolation parameter - */ - public final void interpolate(Tuple2f t1, float alpha) - { + * @param alpha the alpha interpolation parameter + */ + public final void interpolate(Tuple2f t1, float alpha) + { this.x = (1-alpha)*this.x + alpha*t1.x; this.y = (1-alpha)*this.y + alpha*t1.y; - } + } /** * Creates a new object of the same class as this object. @@ -562,9 +562,9 @@ public abstract class Tuple2f implements java.io.Serializable, Cloneable { /** * Get the x coordinate. - * + * * @return the x coordinate. - * + * * @since vecmath 1.5 */ public final float getX() { @@ -574,9 +574,9 @@ public abstract class Tuple2f implements java.io.Serializable, Cloneable { /** * Set the x coordinate. - * + * * @param x value to x coordinate. - * + * * @since vecmath 1.5 */ public final void setX(float x) { @@ -586,9 +586,9 @@ public abstract class Tuple2f implements java.io.Serializable, Cloneable { /** * Get the y coordinate. - * + * * @return the y coordinate. - * + * * @since vecmath 1.5 */ public final float getY() { @@ -598,9 +598,9 @@ public abstract class Tuple2f implements java.io.Serializable, Cloneable { /** * Set the y coordinate. - * + * * @param y value to y coordinate. - * + * * @since vecmath 1.5 */ public final void setY(float y) { -- cgit v1.2.3