JavaScript - Math.SQRT1_2 Property
The JavaScript Math.SQRT1_2 property is the Square root of ½. It is approximately 0.707.
Syntax
Math.SQRT1_2
Example:
The example below shows the usage of Math.SQRT1_2 property.
var txt; txt = "Math.SQRT1_2 = " + Math.SQRT1_2 + "<br>"; txt = txt + "1/Math.SQRT1_2 = " + 1/Math.SQRT1_2 + "<br>"; txt = txt + "1/Math.SQRT1_2**2 = " + 1/Math.SQRT1_2**2 + "<br>"; txt = txt + "Math.SQRT1_2*Math.SQRT2 = " + Math.SQRT1_2*Math.SQRT2 + "<br>";
The output (value of txt) after running above script will be:
Math.SQRT1_2 = 0.7071067811865476 1/Math.SQRT1_2 = 1.414213562373095 1/Math.SQRT1_2**2 = 1.9999999999999996 Math.SQRT1_2*Math.SQRT2 = 1.0000000000000002
❮ JavaScript - Math Object