SQRT1_2 (JavaScript)

The value of the square root of 1/2.

Defined in

Math (JavaScript)

Syntax

Math.SQRT1_2

Usage

SQRT1_2 is a constant.

The value of the square root of 1/2 is approximately 0.7071067811865476.

Examples

This button onclick event calculates the side of a square given its diagonal.
sessionScope.side = Math.SQRT1_2 * sessionScope.diag