From 82fcf95215a848a56f46a6d16bb8c7ffe7f3ba0c Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Mon, 15 Nov 2021 08:27:23 -0500 Subject: [PATCH] clarification about behavior of parseInt() --- core/src/processing/core/PApplet.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index d87fb9008..537bdb606 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -9131,7 +9131,10 @@ public class PApplet implements PConstants { /** * Parse a String to an int, and provide an alternate value that - * should be used when the number is invalid. + * should be used when the number is invalid. If there's a decimal place, + * it will be truncated, making this more of a toInt() than parseInt() + * function. This is because the method is used internally for casting. + * Not ideal, but the name was chosen before that clarification was made. */ static final public int parseInt(String what, int otherwise) { try {