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 › double abs( double )
Page Index Toggle Pages: 1
double abs( double ) ? (Read 670 times)
double abs( double ) ?
Nov 19th, 2006, 2:29am
 
Just curious about this one;  the language provides abs() for int and float, but not double.  

Any particular reason?

-s Smiley
Re: double abs( double ) ?
Reply #1 - Nov 19th, 2006, 6:16pm
 
there are (virtually) no functions in the api that use doubles. doubles are slower (less so the case now than when the project began) to process and overkill for nearly all of the work done in processing.

if you want abs(double), use Math.abs() from Java.
Re: double abs( double ) ?
Reply #2 - Nov 19th, 2006, 6:42pm
 
gotcha.  understood.  Smiley

Thanks!
Page Index Toggle Pages: 1