Skip to content

Commit 39c9807

Browse files
committed
refactor: rename a variable "e" --> "edge"
1 parent 2e56401 commit 39c9807

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Maths/SquareRootLogarithmic.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ const squareRootLogarithmic = (num) => {
2121
}
2222
let answer = 0
2323
let sqrt = 0
24-
let e = num
24+
let edge = num
2525

26-
while (sqrt <= e) {
27-
const mid = Math.trunc((sqrt + e) / 2)
26+
while (sqrt <= edge) {
27+
const mid = Math.trunc((sqrt + edge) / 2)
2828
if (mid * mid === num) {
2929
return mid
3030
} else if (mid * mid < num) {
3131
sqrt = mid + 1
3232
answer = mid
3333
} else {
34-
e = mid - 1
34+
edge = mid - 1
3535
}
3636
}
3737

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy