$(U Vector2) is a simple structure that defines a mathematical vector with
two coordinates (x and y). It can be used to represent anything that has two
dimensions: a size, a point, a velocity, etc.
The template parameter T is the type of the coordinates. It can be any type
that supports arithmetic operations (+, -, /, *) and comparisons (==, !=),
for example int or float.
You generally don't have to care about the templated form (Vector2!(T),
the most common specializations have special aliases:
Vector2!(float) is Vector2f
Vector2!(int) is Vector2i
Vector2!(uint) is Vector2u
$(PARA
The $(U Vector2) class has a small and simple interface, its x and y members
can be accessed directly (there are no accessors like `setX()`, `getX()`) and
it contains no mathematical function like dot product, cross product, length,
etc.)
$(U Vector2) is a simple structure that defines a mathematical vector with two coordinates (x and y). It can be used to represent anything that has two dimensions: a size, a point, a velocity, etc.
The template parameter T is the type of the coordinates. It can be any type that supports arithmetic operations (+, -, /, *) and comparisons (==, !=), for example int or float.
You generally don't have to care about the templated form (Vector2!(T), the most common specializations have special aliases:
$(PARA The $(U Vector2) class has a small and simple interface, its x and y members can be accessed directly (there are no accessors like `setX()`, `getX()`) and it contains no mathematical function like dot product, cross product, length, etc.)