diff options
author | chai <chaifix@163.com> | 2022-04-18 10:08:33 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2022-04-18 10:08:33 +0800 |
commit | ba1faafd285f15c7c91720371f9f0ecd96fa6b27 (patch) | |
tree | 3d53d014dfc59aee10926ba60b7b62c4082b93e0 /AlienSurvival/Assets/Test/Scripts/TestMathHelper.cs | |
parent | ea9cf7843d50f3debf6ea8b5e31976dc7a15f483 (diff) |
*bomb
Diffstat (limited to 'AlienSurvival/Assets/Test/Scripts/TestMathHelper.cs')
-rw-r--r-- | AlienSurvival/Assets/Test/Scripts/TestMathHelper.cs | 16 |
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 |