diff options
Diffstat (limited to 'ardor3d-math')
4 files changed, 33 insertions, 33 deletions
diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/ColorRGBA.java b/ardor3d-math/src/main/java/com/ardor3d/math/ColorRGBA.java index ea11e50..a6879cd 100644 --- a/ardor3d-math/src/main/java/com/ardor3d/math/ColorRGBA.java +++ b/ardor3d-math/src/main/java/com/ardor3d/math/ColorRGBA.java @@ -443,19 +443,19 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo final String blue = Integer.toHexString(Math.round(MathUtils.clamp(getBlue(), 0f, 1f) * 255)); final String alpha = Integer.toHexString(Math.round(MathUtils.clamp(getAlpha(), 0f, 1f) * 255)); if (red.length() < 2) { - sb.append("0"); + sb.append('0'); } sb.append(red); if (green.length() < 2) { - sb.append("0"); + sb.append('0'); } sb.append(green); if (blue.length() < 2) { - sb.append("0"); + sb.append('0'); } sb.append(blue); if (alpha.length() < 2) { - sb.append("0"); + sb.append('0'); } sb.append(alpha); return sb.toString(); @@ -995,7 +995,7 @@ public class ColorRGBA implements Cloneable, Savable, Externalizable, ReadOnlyCo } // XXX: should we parse words too? eg 'red'... - if (!colorString.startsWith("#")) { + if (colorString.length() == 0 || colorString.charAt(0) != '#') { throw new IllegalArgumentException("must start with #."); } diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/FastMath.java b/ardor3d-math/src/main/java/com/ardor3d/math/FastMath.java index 6ef29eb..0b45885 100644 --- a/ardor3d-math/src/main/java/com/ardor3d/math/FastMath.java +++ b/ardor3d-math/src/main/java/com/ardor3d/math/FastMath.java @@ -83,7 +83,7 @@ public enum FastMath { /** inverseSqrt: (0,‚àû) -> (0,‚àû) **/ public final static double inverseSqrt(double x) { final double xhalves = 0.5d * x; - x = Double.longBitsToDouble(0x5FE6EB50C7B537AAl - (Double.doubleToRawLongBits(x) >> 1)); + x = Double.longBitsToDouble(0x5FE6EB50C7B537AAL - (Double.doubleToRawLongBits(x) >> 1)); return x * (1.5d - xhalves * x * x); // more iterations possible } diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/Matrix3.java b/ardor3d-math/src/main/java/com/ardor3d/math/Matrix3.java index a13ddc4..78a9b16 100644 --- a/ardor3d-math/src/main/java/com/ardor3d/math/Matrix3.java +++ b/ardor3d-math/src/main/java/com/ardor3d/math/Matrix3.java @@ -1705,31 +1705,31 @@ public class Matrix3 implements Cloneable, Savable, Externalizable, ReadOnlyMatr @Override public String toString() { final StringBuffer result = new StringBuffer("com.ardor3d.math.Matrix3\n[\n"); - result.append(" "); + result.append(' '); result.append(_m00); - result.append(" "); + result.append(' '); result.append(_m01); - result.append(" "); + result.append(' '); result.append(_m02); result.append(" \n"); - result.append(" "); + result.append(' '); result.append(_m10); - result.append(" "); + result.append(' '); result.append(_m11); - result.append(" "); + result.append(' '); result.append(_m12); result.append(" \n"); - result.append(" "); + result.append(' '); result.append(_m20); - result.append(" "); + result.append(' '); result.append(_m21); - result.append(" "); + result.append(' '); result.append(_m22); result.append(" \n"); - result.append("]"); + result.append(']'); return result.toString(); } diff --git a/ardor3d-math/src/main/java/com/ardor3d/math/Matrix4.java b/ardor3d-math/src/main/java/com/ardor3d/math/Matrix4.java index 9b2131f..8d21433 100644 --- a/ardor3d-math/src/main/java/com/ardor3d/math/Matrix4.java +++ b/ardor3d-math/src/main/java/com/ardor3d/math/Matrix4.java @@ -2099,47 +2099,47 @@ public class Matrix4 implements Cloneable, Savable, Externalizable, ReadOnlyMatr @Override public String toString() { final StringBuffer result = new StringBuffer("com.ardor3d.math.Matrix4\n[\n"); - result.append(" "); + result.append(' '); result.append(_m00); - result.append(" "); + result.append(' '); result.append(_m01); - result.append(" "); + result.append(' '); result.append(_m02); - result.append(" "); + result.append(' '); result.append(_m03); result.append(" \n"); - result.append(" "); + result.append(' '); result.append(_m10); - result.append(" "); + result.append(' '); result.append(_m11); - result.append(" "); + result.append(' '); result.append(_m12); - result.append(" "); + result.append(' '); result.append(_m13); result.append(" \n"); - result.append(" "); + result.append(' '); result.append(_m20); - result.append(" "); + result.append(' '); result.append(_m21); - result.append(" "); + result.append(' '); result.append(_m22); - result.append(" "); + result.append(' '); result.append(_m23); result.append(" \n"); - result.append(" "); + result.append(' '); result.append(_m30); - result.append(" "); + result.append(' '); result.append(_m31); - result.append(" "); + result.append(' '); result.append(_m32); - result.append(" "); + result.append(' '); result.append(_m33); result.append(" \n"); - result.append("]"); + result.append(']'); return result.toString(); } |