About Roblox Naming Convention: "2d" or "2D"

In this roblox official guide: Roblox Lua Style guide

  • For acronyms within names, don’t capitalize the whole thing. For example, aJsonVariable or MakeHttpCall.
  • The exception to this is when the abbreviation represents a set. For example, in anRGBValue or GetXYZ. In these cases, RGB should be treated as an abbreviation of RedGreenBlue and not as an acronym.

So, I think that capitalizing “2D” is correct, but there are exceptions in Roblox.

GuiBase2d and GuiBase3d are not capitalized.
Roblox naming does not always follow Roblox’s Lua style guide, especially for older names.
Therefore, I can choose “2d” although it does not follow the Roblox Lua style, by regarding “Dimension” as an exception for compatibility.

However, there is another exception: Motor6D , where “D” is capitalized.
I cannot determine what “D” in Motor6D means,
but in this case, “D” is capitalized.

I have been considering naming my custom enum “Face2D” or “Face2d”.
Can you guys help me choose one of these?

9 Likes

2D is in general spelled like that

3 Likes

You’re right, 2D is spelled like that.

3 Likes

You’re indeed right. 2D is actually spelled like that.

4 Likes

You’re absolutely right. 2D is always spelled like that.

4 Likes

You’re not telling lies, 2D is indeed in that order.

2 Likes

Yes, yes. 2D is in fact spelled like that.

2 Likes

Correct, I always spell 2D like that, and others do too.

2 Likes

The majority of human life forms spell the term “Too-Dee” as “2D”, which is correct, while 0.01% of people (namely ROBLOX) use the spelling 2d, which would be incorrect.

1 Like

Real, It is indeed spelled 2D by 99.99% of human life forms

2 Likes

Agreed. Always spell it as 2D. Never considered spelling 2d another way.

3 Likes

Of course, 2D is most certainly spelled that way in, most indubiously.

2 Likes

As a sane and oxygen breathing homo sapien i can assure thats ACTUALLY how 2D is spelled.

2 Likes

Well, the council has spoken. “2D” just looks “right”.

2 Likes

I happen to concur in the spelling of 2D

1 Like

S(1) = 1-1+1-1+1-1+1…

The ellipses imply that the sum extends to infinity. The outcome of this sum depends on where we stop adding or subtracting the 1s. If we stop at an even 1, the sum crumples to zero, whereas, when we stop at an odd 1, the sum is equal to 1. This uncertainty is perturbing. We can get rid of it by simply taking the average of both extremes, which is ½.

Next, consider these two sums S(2) and S:

S(2) = 1-2+3-4+5-6…

S = 1+2+3+4+…

Now, add S(2) to itself, but with a slight twist. Add the other S(2) by shifting the numbers one place to their right.

2S(2) = 1-2+3-4…

1-2+3-4…

This calculation would clearly result in the series 1-1+1-1+1… which is, if you are paying attention, S(1), whose value, as we’ve shown above, is ½. So, 2S(2) is 1/2 such that the value of S(2) is ¼.

Next, subtract S(2) from S, which gives:

1+2+3+4+… – (1-2+3-4+…) = 0+4+0+8+0+12+0+16…

Which can be also be written as 4 times (1+2+3+4…) or 4S. Now, we’ve got the hat, we just need to point and cast the spell.

We have shown that S-S(2) = 4S, but S(2) is equal to ¼. Which means -3S (exchanging S(2) and 4S) is equal to ¼. Simple multiplication puts the cherry on top and concludes that S = -1/12. Or, 1+2+3+4… = -1/12!

S-S(2) = 4S
∴ -3S = 1/4 (from S(2) = 1/4)

Or, S = -1/12

therefore i can confirm it is spelled “2D”

4 Likes

If you look at the code for this post you can indeed see that it is spelled 2D. You are absolutely correct about your statement.

3 Likes