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

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

Printable View

- 10-19-2012, 03: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, 03:49 AMkillutchRe: what is the math function to square a number/ variable?
Math.sqrt(number) i think

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

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

- 10-19-2012, 04: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, 06:36 AMpbrockway2Re: what is the math function to square a number/ variable?
or foo*foo

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

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

[**Moderator edit: link removed**]