Floor division operator // #825
petrihakkinen
started this conversation in
Ideas
Replies: 3 comments
-
No need to comment on this thread. I'll write a proper RFC for this. |
Beta Was this translation helpful? Give feedback.
0 replies
-
No plans for that at the moment. |
Beta Was this translation helpful? Give feedback.
0 replies
-
The RFC is now here: #832 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! Are there plans to add floor division operator
//
to Luau? I think it would make sense to add it:math.floor
has been a common source of subtle bugs for me. For example, halve the size of some object like a texture or UI element, which works correctly only if the size is even (which is common for textures but not always the case!)math.floor
is by far the most frequently used math function (see stats below). I've actually renamedmath.floor
tofloor
in a couple of projects to make it little bit easier to use but it feels hacky.Some stats from a shipped game:
p.s. I don't agree with the rationale given on the Compatibility page :-) ("no strong use cases, syntax overlaps with C comments")
Beta Was this translation helpful? Give feedback.
All reactions