Math.sqrt() FunctionNameMath.sqrt() Function---compute a square rootAvailabilityNavigator 2.0, Internet Explorer 3.0 Synopsis
Math.sqrt(x) Arguments
ReturnsThe square root of x. DescriptionMath.sqrt() returns the square root of its argument, which must be greater than or equal to zero. UsageYou can compute roots other than the square root of a number with Math.pow(). For example:
function sq_rt(x) { return Math.pow(x,1/2); } function cube_rt(x) { return Math.pow(x,1/3); } |
|