| 12345678910111213141516171819 |
- //---------------------------------------------------------------------------------
- // Ported to the Atomic Game Engine
- // Originally written for XNA 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));
- }
- }
- }
|