I've seen different code snippets using these types, but I haven't seen if they are defined in some <standard header file> or just defined in a "local header file" or even at file level.
So what Im wondering is: Is there any standard header file that defines these types? Or is there some standard definitions that everyone uses that I should copy?
I guess that a possible and common use to these types are representing coordinates, am I wrong?
Is there anything else I should think about if I want to use these to represent positions in a grid? Any reasons why or why not to use them?
EDIT:
Clarification: int2 means a pair of ints, float3 means a triplet of floats.
If these types were predefined somewhere it would be nice to use them instead of having to write it from scratch including the standard algebraic functions (operator+, operator-, etc.).
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…