on-internet
← Community

Faster Alternative to Math.sqrt()

Stack Overflow ·

Are there any alternatives to using Math.sqrt() to get the square root of an unknown value? For example: var random = (Math.random() * (999 - 1)) + 1; var sqrt = Math.sqrt(random); I've heard that using Math.sqrt() to get the square root of a number is a very slow operation, I'm just wondering if there are any faster ways I can get the square root of a random number. Any help with this would be greatly appreciated.

Comments

Sign in or sign up to comment and upvote.

No comments yet.