SQRT2 (JavaScript)
The value of the square root of 2.
Defined in
Math (JavaScript)Syntax
Math.SQRT2
Usage
SQRT2
is a constant.The value of the square root of 2 is approximately 1.4142135623730951.
Examples
This buttononclick
event
calculates the diagonal of a square given a side.sessionScope.diag = Math.SQRT2 * sessionScope.side