Tom O
Tom O

Reputation: 1800

Difference between Vector2 and Vector4

I started learning about XNA game studios today and was wondering what's the differences between Vector2 and Vector4

Thanks :)

Upvotes: 0

Views: 2109

Answers (1)

Cédric Bignon
Cédric Bignon

Reputation: 13022

Vector2 contains 2 float-components. It is used mainly for 2D graphics (2D -> 2 components)

Vector4 contains 4 float-components. It is used for 3D graphics (in an 3D affine space, 3D affine transformations can be done using homogeneous coordinates (4 components))

Upvotes: 8

Related Questions