We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › floor() does not take double
Page Index Toggle Pages: 1
floor() does not take double (Read 773 times)
floor() does not take double
Jan 14th, 2007, 11:27am
 
I get an error on the following code,
running 0123 BETA on Linux.

--code

double x = 100.2;
floor(x);

--error

/tmp/build4147.tmp/Temporary_3129_7309.java:2:1:2:8: Semantic Error: No applicable overload for a method with signature "floor(double)" was found in type "processing.core.PApplet". Perhaps you wanted the overloaded version "int floor(float $1);" instead?

--end

Thank you for your time.
Re: floor() does not take double
Reply #1 - Jan 14th, 2007, 2:13pm
 
If you want to work with doubles, use Math.floor(x); from the Java maths functions.

See: http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Math.html for a full reference.
Re: floor() does not take double
Reply #2 - Jan 14th, 2007, 4:51pm
 
see also:
http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Syntax;action=display;num=1168789838
Page Index Toggle Pages: 1