Skript icon indicating copy to clipboard operation
Skript copied to clipboard

Re-introduce Scientific Notation

Open NotSoDelayed opened this issue 4 years ago • 2 comments

Suggestion

Re-introduce scientific notation into Skript, which exists before 2.6 update. (i.e. set {_x} to 1234 * 1e+6)

Why?

As mentioned above, scientific notation exists until Skript 2.6 update. I might have missed something of why this was removed after. Although it is not an important feature to have, but it is useful while performing calculations and such.

Other

No response

Agreement

  • [X] I have read the guidelines above and confirm I am following them with this suggestion.

NotSoDelayed avatar Jan 30 '22 04:01 NotSoDelayed

Caused by #4275. The regex check doesn't take scientific notation (or any other notation other than normal decimal) into account. I don't recommend using the regex pattern in the link above, as it contains much stuff we don't need in Skript (e.g. hexadecimal, infinity, NaN).

Marking as enhancement since I don't think accepting scientific notation was ever intentional, given by the pattern in the docs: image

TPGamesNL avatar Jan 30 '22 10:01 TPGamesNL

I agree with TP, I don't think other notations are a necessary addition.

Moderocky avatar Jan 30 '22 10:01 Moderocky