mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-05 00:01:37 +08:00
style(Maths/SquareRoot.js): Fixed tabs according to standard
This commit is contained in:
@ -7,11 +7,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
function sqrt (num, precision = 10) {
|
function sqrt (num, precision = 10) {
|
||||||
let sqrt = 1
|
let sqrt = 1
|
||||||
for (let i = 0; i < precision; i++) {
|
for (let i = 0; i < precision; i++) {
|
||||||
sqrt -= (sqrt * sqrt - num) / (2 * sqrt)
|
sqrt -= (sqrt * sqrt - num) / (2 * sqrt)
|
||||||
}
|
}
|
||||||
return sqrt
|
return sqrt
|
||||||
}
|
}
|
||||||
|
|
||||||
export { sqrt }
|
export { sqrt }
|
||||||
|
Reference in New Issue
Block a user