The SQRT1_2
property returns the square root of 1/2, approximately 0.707.
SQRT1_2 |
Yes | Yes | Yes | Yes | Yes |
Math.SQRT1_2
A Number representing the square root of 1/2.
<!DOCTYPE html>
<html>
<body>
<button onclick="myFunction()">test</button>
<p id="demo"></p>
<script>
function myFunction() {<!-- ww w . j a va 2s . com-->
document.getElementById("demo").innerHTML = Math.SQRT1_2;
}
</script>
</body>
</html>
The code above is rendered as follows: