aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java b/src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java
index 73244cb13..af1db0c1e 100644
--- a/src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java
+++ b/src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java
@@ -1908,11 +1908,11 @@ public final class FloatUtil {
final int a0 = aOffset + a.position();
if(rowMajorOrder) {
for(int c=0; c<columns; c++) {
- sb.append( String.format((Locale)null, f+" ", a.get( a0 + row*columns + c ) ) );
+ sb.append( String.format((Locale)null, f+", ", a.get( a0 + row*columns + c ) ) );
}
} else {
for(int r=0; r<columns; r++) {
- sb.append( String.format((Locale)null, f+" ", a.get( a0 + row + r*rows ) ) );
+ sb.append( String.format((Locale)null, f+", ", a.get( a0 + row + r*rows ) ) );
}
}
return sb;
@@ -1936,11 +1936,11 @@ public final class FloatUtil {
}
if(rowMajorOrder) {
for(int c=0; c<columns; c++) {
- sb.append( String.format((Locale)null, f+" ", a[ aOffset + row*columns + c ] ) );
+ sb.append( String.format((Locale)null, f+", ", a[ aOffset + row*columns + c ] ) );
}
} else {
for(int r=0; r<columns; r++) {
- sb.append( String.format((Locale)null, f+" ", a[ aOffset + row + r*rows ] ) );
+ sb.append( String.format((Locale)null, f+", ", a[ aOffset + row + r*rows ] ) );
}
}
return sb;
@@ -1963,11 +1963,15 @@ public final class FloatUtil {
sb = new StringBuilder();
}
final String prefix = ( null == rowPrefix ) ? "" : rowPrefix;
+ sb.append(prefix).append("{ ");
for(int i=0; i<rows; i++) {
- sb.append(prefix).append("[ ");
+ if( 0 < i ) {
+ sb.append(prefix).append(" ");
+ }
matrixRowToString(sb, f, a, aOffset, rows, columns, rowMajorOrder, i);
- sb.append("]").append(Platform.getNewline());
+ sb.append(Platform.getNewline());
}
+ sb.append(prefix).append("}").append(Platform.getNewline());
return sb;
}
@@ -1988,11 +1992,15 @@ public final class FloatUtil {
sb = new StringBuilder();
}
final String prefix = ( null == rowPrefix ) ? "" : rowPrefix;
+ sb.append(prefix).append("{ ");
for(int i=0; i<rows; i++) {
- sb.append(prefix).append("[ ");
+ if( 0 < i ) {
+ sb.append(prefix).append(" ");
+ }
matrixRowToString(sb, f, a, aOffset, rows, columns, rowMajorOrder, i);
- sb.append("]").append(Platform.getNewline());
+ sb.append(Platform.getNewline());
}
+ sb.append(prefix).append("}").append(Platform.getNewline());
return sb;
}
@@ -2314,10 +2322,10 @@ public final class FloatUtil {
/**
* Returns orthogonal distance
- * (1f/zNear-1f/orthoDist)/(1f/zNear-1f/zFar);
+ * (1f/zNear-1f/orthoZ) / (1f/zNear-1f/zFar);
*/
public static float getOrthoWinZ(final float orthoZ, final float zNear, final float zFar) {
- return (1f/zNear-1f/orthoZ)/(1f/zNear-1f/zFar);
+ return (1f/zNear-1f/orthoZ) / (1f/zNear-1f/zFar);
}
} \ No newline at end of file