Area=(Math.PI*radius^2);

^2 obviously doesnt work, so how would I square the raduis? Thanks

Printable View

- 10-19-2012, 04:47 AMzhiderwhat is the math function to square a number/ variable?
Area=(Math.PI*radius^2);

^2 obviously doesnt work, so how would I square the raduis? Thanks - 10-19-2012, 04:49 AMkillutchRe: what is the math function to square a number/ variable?
Math.sqrt(number) i think

- 10-19-2012, 04:51 AMzhiderRe: what is the math function to square a number/ variable?
Thanks a ton

- 10-19-2012, 04:54 AMkillutchRe: what is the math function to square a number/ variable?
retract this post :/

- 10-19-2012, 05:19 AMJunkyRe: what is the math function to square a number/ variable?
Math.sqrt finds the square root. Perhaps you want Math.pow instead.

- 10-19-2012, 07:36 AMpbrockway2Re: what is the math function to square a number/ variable?
or foo*foo

- 10-19-2012, 10:50 AMgowthamguthaRe: what is the math function to square a number/ variable?
No sqrt(number) gives square root not square.

- 10-19-2012, 10:53 AMgowthamguthaRe: what is the math function to square a number/ variable?
Area=(Math.PI*(Math.pow(radius,2)));

[**Moderator edit: link removed**]