1. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  2. Unity 2017.2 beta is now available for download.
    Dismiss Notice
  3. Unity 2017.1 is now released.
    Dismiss Notice
  4. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  5. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  6. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice

Rename Vector3Int to Vector3i

Discussion in '2017.2 Beta' started by Deni35, Jul 12, 2017.

  1. Deni35

    Deni35

    Joined:
    Jul 10, 2012
    Posts:
    42
    Look at this:
    [​IMG]

    I'm sure the Vector3i looks much better.
     
    MrEsquire likes this.
  2. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    19,143
    I don't think it looks better but it does not look worse.

    Also, saving two characters while making it more obscure to read isn't something I can get behind, so the verbose version is superior.

    I wasn't even aware there was an int version. It must be unique to 2017.2.
     
    DMeville and pahe like this.
  3. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    674
    Already use a Vector3Int as part of a voxel framework, so this new then.. maybe they should have gone with Vector3i :)
     
  4. Peter77

    Peter77

    Joined:
    Jun 12, 2013
    Posts:
    656
    The .NET Framework Class Naming Guidelines includes the following point:
    In this case, it seems Vector3Int is more compliant to the Naming Guidelines than Vector3i, according to the document at least.
    https://msdn.microsoft.com/en-us/library/4xhs4564(v=vs.71).aspx
     
  5. mh114

    mh114

    Joined:
    Nov 17, 2013
    Posts:
    257
    If Vector3 were Vector3f (as it is in some other frameworks, such as LWJGL and Ogre), Vector3i would make sense. But as things are, Vector3Int is the better name IMO.
     
  6. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    327
    I'm not. ;-)
     
  7. jwvanderbeck

    jwvanderbeck

    Joined:
    Dec 4, 2014
    Posts:
    196
    Verbose is always better IMHO. In today's realm of autocomplete editors, verbose naming is preferred in most cases. It requires no more typing, and is clear and unambiguous.
     
  8. Kuura

    Kuura

    Joined:
    Apr 16, 2015
    Posts:
    21
    Don't tell me there's a Vector3Double too.
     
  9. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    19,143
    Vector3Long come back, all is forgiven.
     
  10. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    1,423
    Personally I prefer using the internal Type first, as that maps to how the rest of the syntax of C# works in my head:

    Code (CSharp):
    1. IntVector3 foo = new IntVector3(0,0,0);
    2.  
     
    jwvanderbeck and hippocoder like this.