| 123456789101112131415161718 |
- //---------------------------------------------------------------------------------
- // Written by Michael Hoffman
- // Find the full tutorial at: http://gamedev.tutsplus.com/series/vector-shooter-xna/
- //----------------------------------------------------------------------------------
- using System;
- using AtomicEngine;
- namespace AtomicBlaster
- {
- static class MathUtil
- {
- public static Vector2 FromPolar(float angle, float magnitude)
- {
- return magnitude * new Vector2((float)Math.Cos(angle), (float)Math.Sin(angle));
- }
- }
- }
|