add println(long) and double to avoid casting bug (issue #969)

This commit is contained in:
benfry
2012-03-25 14:27:33 +00:00
parent 23b887907f
commit e610e5ed5c
2 changed files with 36 additions and 8 deletions
+32 -6
View File
@@ -3554,11 +3554,21 @@ public class PApplet extends Applet
System.out.flush();
}
static public void print(long what) {
System.out.print(what);
System.out.flush();
}
static public void print(float what) {
System.out.print(what);
System.out.flush();
}
static public void print(double what) {
System.out.print(what);
System.out.flush();
}
static public void print(String what) {
System.out.print(what);
System.out.flush();
@@ -3603,27 +3613,43 @@ public class PApplet extends Applet
* @param what boolean, byte, char, color, int, float, String, Object
*/
static public void println(byte what) {
print(what); System.out.println();
System.out.println(what);
System.out.flush();
}
static public void println(boolean what) {
print(what); System.out.println();
System.out.println(what);
System.out.flush();
}
static public void println(char what) {
print(what); System.out.println();
System.out.println(what);
System.out.flush();
}
static public void println(int what) {
print(what); System.out.println();
System.out.println(what);
System.out.flush();
}
static public void println(long what) {
System.out.println(what);
System.out.flush();
}
static public void println(float what) {
print(what); System.out.println();
System.out.println(what);
System.out.flush();
}
static public void println(double what) {
System.out.println(what);
System.out.flush();
}
static public void println(String what) {
print(what); System.out.println();
System.out.println(what);
System.out.flush();
}
static public void println(Object what) {
+4 -2
View File
@@ -1,4 +1,6 @@
0205 core
X add support for println(long) because it was converting the type to float
X http://code.google.com/p/processing/issues/detail?id=969
sort out full screen issues
@@ -20,8 +22,8 @@ o override default setting of macosx (yes) and linux/win (no)
o http://dev.processing.org/bugs/show_bug.cgi?id=1043
o linux present mode isn't working properly
X removing FSEM, too buggy and problematic
_ --display not working on osx
_ http://code.google.com/p/processing/issues/detail?id=71
X --display not working on osx
X http://code.google.com/p/processing/issues/detail?id=71
X implement full screen mode.. this takes over the screen as best it can
X size(screen.width, screen.height, OPENGL);
X if size is screen.width and screen.height, does its best