This topic created in 2302 days ago, the information mentioned may be changed or developed.
一个分布类似矩形的元素集合,要记录其左上角的位置,右上角、左下角、右下角的位置,值都是正整数。该怎么命名这四个变量?
命名越短越好。我刚才想到一个,就是从右上角开始,按顺时针方向依次是 p45、p135、p225、p315,是四个方向的角度,p 指代 position 位置。
还有其他好的命名吗?
6 replies • 2020-02-20 20:24:43 +08:00
 |
|
2
fanqiang07 Feb 20, 2020
pNE -> NorthEast pSE -> SouthEase pSW -> SouthWest pNW -> NorthWest
|
 |
|
4
CismonX Feb 20, 2020
upperLeft/topLeft upperRight/topRight lowerLeft/bottomLeft lowerRight/bottomRight
|
 |
|
5
xupefei Feb 20, 2020
最常用的命名是 TopLeft TopRight LeftBottom RightBottom
顺序是左上角开始逆时针。
|