How can I get a vector type in C#?

Mendokusai picture Mendokusai · Jan 31, 2009 · Viewed 7.2k times · Source

I want to use Vectors in a C# application I'm writing, sepcifically a Vector3.

What's the best way for me to get a Vector type without writing my own?

Answer

Kilhoffer picture Kilhoffer · Jan 31, 2009

I used one in a POC that I found on CodeProject. It's not ideal, but it worked for our situation. At the time, however, it did not have a method to reflect a Vector3 about a given normal, but that may have changed since then.

If you don't mind using DirectX (some stay away from it for whatever reason), then there is a Vector3 type in that library as well.