Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » JavaScript nth root function (that actually works)
- savaka
- Scratcher
1000+ posts
JavaScript nth root function (that actually works)
Anyone know how to do this?
Last edited by savaka (Aug. 2, 2014 19:25:58)
- Thepuzzlegame
- Scratcher
1000+ posts
JavaScript nth root function (that actually works)
Ignore this
Last edited by Thepuzzlegame (Aug. 2, 2014 19:12:48)
hi!
- goldfish678
- Scratcher
1000+ posts
JavaScript nth root function (that actually works)
With ProcessingJS, you just use
.
sqrt(num)
- goldfish678
- Scratcher
1000+ posts
JavaScript nth root function (that actually works)
Can't you just use this? Javascript, not Scratch…([sqrt v] of (9))
- Thepuzzlegame
- Scratcher
1000+ posts
JavaScript nth root function (that actually works)
Oh, I thought they were trying to write a JavaScript extension for scratch. My badCan't you just use this? Javascript, not Scratch…([sqrt v] of (9))
Last edited by Thepuzzlegame (Aug. 2, 2014 19:11:45)
hi!
- savaka
- Scratcher
1000+ posts
JavaScript nth root function (that actually works)
SORRY BIG MISTAKE I MEANT NTH ROOT
- bobbybee
- Scratcher
1000+ posts
JavaScript nth root function (that actually works)
Math.pow(x, 1/n)
“Ooo, can I call you Señorita Bee?” ~Chibi-Matoran
- savaka
- Scratcher
1000+ posts
JavaScript nth root function (that actually works)
Will that work in all cases? Math.pow(x, 1/n)
- bobbybee
- Scratcher
1000+ posts
JavaScript nth root function (that actually works)
Will that work in all cases? Math.pow(x, 1/n)
Yes. By algebraic definition, the nth root of x equals x ^ (1/n). That's just the JavaScript equivalent.
“Ooo, can I call you Señorita Bee?” ~Chibi-Matoran
- savaka
- Scratcher
1000+ posts
JavaScript nth root function (that actually works)
Thanks! TOPIC CLOSED. (Oh yeah, not 24 hours yet. Reporting…)Will that work in all cases? Math.pow(x, 1/n)
Yes. By algebraic definition, the nth root of x equals x ^ (1/n). That's just the JavaScript equivalent.
- Discussion Forums
- » Advanced Topics
- » JavaScript nth root function (that actually works)