summaryrefslogtreecommitdiff
path: root/AlienSurvival/Assets/Test/Scripts/TestMathHelper.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2022-04-18 10:08:33 +0800
committerchai <chaifix@163.com>2022-04-18 10:08:33 +0800
commitba1faafd285f15c7c91720371f9f0ecd96fa6b27 (patch)
tree3d53d014dfc59aee10926ba60b7b62c4082b93e0 /AlienSurvival/Assets/Test/Scripts/TestMathHelper.cs
parentea9cf7843d50f3debf6ea8b5e31976dc7a15f483 (diff)
*bomb
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