Fractional Exponents in pow() #5087
rontarrant
started this conversation in
Scripting
Replies: 2 comments 3 replies
-
You already can use floats as exponent. |
Beta Was this translation helpful? Give feedback.
0 replies
-
It doesn't work with an exponent of (1 / 12) or the decimal equivalent
thereof. I'm guessing this is related to the fact that Godot uses
single-precision floating point numbers (as opposed to double-precision).
…On Sat, Aug 6, 2022 at 8:19 AM miv391 ***@***.***> wrote:
You already can use floats as exponent. pow(9, 0.5) returns 3.
—
Reply to this email directly, view it on GitHub
<#5087 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALCET5YHC4HFUVRVMNRD7IDVXZJ3XANCNFSM55YIEJBQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
.com>
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I think it would be handy to have fractional exponents in GDScript's pow() method. Python allows them; C# does, too. And even though we can mix C# with GDScript to bring the functionality of fractional exponents to the latter, it would be nice to use pure GDScript instead.
I know I'm not making a very strong argument for this, but maybe it's not such a big deal to implement?
Beta Was this translation helpful? Give feedback.
All reactions