mono/MonoGame — pull request #1830 by Burton-Radons (2013-07-02 09:55:40+00:00)
Title: Makes Vector2/3/4 more consistent, documents them, and tests them.

This replaces the vast majority of the implementation bodies of Vector2/3/4 with a T4 template that generates their code. This increases consistency (a number of methods were only implemented in one or two dimensions for no reason), reduces errors, and reduces code duplication.

I also documented everything in Vector2/3/4.

I also added a test file to check all of the functionality.

I put in a Monogame.Framework.Documentation subdirectory for the SandCastle help file builder. I want to document everything.

There are two minor API changes. Vector2/3/4 have three purposes - as a tuple of float values, as a vector in the Physics sense, and as a position in space. Their APIs are a mishmash of all of these applications. But only * and / scalar binary operators were implemented either here or in XNA, and from what I can tell it was because you can only scale physics vectors. I implemented binary scalar operators everywhere because that seemed pretty silly.

The other change is the addition of "%" as an operator.