This constant returns the numeric value of the square root of 0.5.
The resulting value returned is approximately 0.707106781186548 (to 15.d.p.)
Note that the value of Math.SQRT1_2 is approximately the reciprocal of the value of Math.SQRT2. The word approximately is used here because the mathematical accuracy of JavaScript implementations leaves something to be desired and there are some strange artifacts in some of the calculations.
Prev | Home | Next |
Math.sqrt() | Up | Math.SQRT2 |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |