From c7de0419a8924ae7333bcaed39e797d7c9fc1e69 Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 22 Apr 2022 19:22:09 +0800 Subject: * change folder of resources --- .../Assets/Test/Scripts/TestMathHelper.cs | 43 ---------------------- 1 file changed, 43 deletions(-) delete mode 100644 AlienSurvival/Assets/Test/Scripts/TestMathHelper.cs (limited to 'AlienSurvival/Assets/Test/Scripts/TestMathHelper.cs') diff --git a/AlienSurvival/Assets/Test/Scripts/TestMathHelper.cs b/AlienSurvival/Assets/Test/Scripts/TestMathHelper.cs deleted file mode 100644 index 239d8ed..0000000 --- a/AlienSurvival/Assets/Test/Scripts/TestMathHelper.cs +++ /dev/null @@ -1,43 +0,0 @@ -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) - ); - } - - /// - /// ·µ»Ø½Ç¶È - /// - /// - /// - public static float Angle(Vector2 vector2) - { - return 360 - (Mathf.Atan2(vector2.y, vector2.x) * Mathf.Rad2Deg * Mathf.Sign(vector2.y)); - } - - public static int Check(bool condition) - { - return condition ? 1 : 0; - } - - //public static float Angle(Vector2 vector2) - //{ - // if (vector2.x < 0) - // { - // return 360 - (Mathf.Atan2(vector2.x, vector2.y) * Mathf.Rad2Deg * -1); - // } - // else - // { - // return Mathf.Atan2(vector2.x, vector2.y) * Mathf.Rad2Deg; - // } - //} - -} \ No newline at end of file -- cgit v1.1-26-g67d0