summaryrefslogtreecommitdiff
path: root/AlienSurvival/Assets/Test/Scripts/TestMathHelper.cs
diff options
context:
space:
mode:
Diffstat (limited to 'AlienSurvival/Assets/Test/Scripts/TestMathHelper.cs')
-rw-r--r--AlienSurvival/Assets/Test/Scripts/TestMathHelper.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/AlienSurvival/Assets/Test/Scripts/TestMathHelper.cs b/AlienSurvival/Assets/Test/Scripts/TestMathHelper.cs
new file mode 100644
index 0000000..e2ca833
--- /dev/null
+++ b/AlienSurvival/Assets/Test/Scripts/TestMathHelper.cs
@@ -0,0 +1,16 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class TestMathHelper : MonoBehaviour
+{
+
+ public static Vector2 Rotate(Vector2 v, float delta)
+ {
+ return new Vector2(
+ v.x * Mathf.Cos(delta) - v.y * Mathf.Sin(delta),
+ v.x * Mathf.Sin(delta) + v.y * Mathf.Cos(delta)
+ );
+ }
+
+} \ No newline at end of file