From d69611d66431e28ea35477c6781a00d57ae04fa3 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 7 Apr 2021 21:13:03 +0800 Subject: =?UTF-8?q?*=E5=9B=A0=E4=B8=BA=E6=B2=A1=E6=9C=89meta=EF=BC=8C?= =?UTF-8?q?=E5=AF=BC=E8=87=B4missing=EF=BC=8C=E5=88=A0=E9=99=A4UIEffect?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Test/UIEffect/Program/Common/Matrix2x3.cs | 33 ------------------------ 1 file changed, 33 deletions(-) delete mode 100644 Assets/Test/UIEffect/Program/Common/Matrix2x3.cs (limited to 'Assets/Test/UIEffect/Program/Common/Matrix2x3.cs') diff --git a/Assets/Test/UIEffect/Program/Common/Matrix2x3.cs b/Assets/Test/UIEffect/Program/Common/Matrix2x3.cs deleted file mode 100644 index ec2cb69..0000000 --- a/Assets/Test/UIEffect/Program/Common/Matrix2x3.cs +++ /dev/null @@ -1,33 +0,0 @@ -using UnityEngine; - -namespace Coffee.UIEffects -{ - /// - /// Matrix2x3. - /// - public struct Matrix2x3 - { - public float m00, m01, m02, m10, m11, m12; - - public Matrix2x3(Rect rect, float cos, float sin) - { - const float center = 0.5f; - float dx = -rect.xMin / rect.width - center; - float dy = -rect.yMin / rect.height - center; - m00 = cos / rect.width; - m01 = -sin / rect.height; - m02 = dx * cos - dy * sin + center; - m10 = sin / rect.width; - m11 = cos / rect.height; - m12 = dx * sin + dy * cos + center; - } - - public static Vector2 operator *(Matrix2x3 m, Vector2 v) - { - return new Vector2( - (m.m00 * v.x) + (m.m01 * v.y) + m.m02, - (m.m10 * v.x) + (m.m11 * v.y) + m.m12 - ); - } - } -} -- cgit v1.1-26-g67d0