Name for a class that represents Point and Size

Associate
Joined
10 Jul 2006
Posts
2,423
I use the same class for representing a Point (x and y coordinations) and Size (x and y).

I can't think of a suitable name for the class...can anyone come up with anything.

I could create another class, but I'd rather not as it is JavaScript.
 
I use the same class for representing a Point (x and y coordinations) and Size (x and y).

I can't think of a suitable name for the class...can anyone come up with anything.

I could create another class, but I'd rather not as it is JavaScript.

What is the purpose of the class?

Class naming should represent what the object relates to. It helps to know what the object does, and how its used, in order to correctly name it :)
 
I use the same class for representing a Point (x and y coordinations) and Size (x and y).

Feel free to correct me, but the above doesn't make sense to me. To me a point is simply a co-ordinate of (x,y,z). It ceases to be a point once you add dimensions to it. In your case, size.
 
Back
Top Bottom