Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is it possible to do cube roots in a script?

Asked by 4 years ago

I don't know the math syntax entirely and was just wondering if and how it would be possible. I have a guess but I want to be sure, can I just use something like:

local cubedValue = regularValue^(1/3)

?

1 answer

Log in to vote
1
Answered by
royaltoe 5144 Moderation Voter Community Moderator
4 years ago
Edited 4 years ago

That's a cube root alright. Square root is ^1/2 while cube root is 1^3 so you're all good.

Do the math in a calculator or google cubed root of ___ if you want to check your work since you can always check your work with math.

0
ok thank you. yeah i figured it would work but i wanted to be sure ejones808 34 — 4y
Ad

Answer this question