Skip to content

Commit

Permalink
增加测试
Browse files Browse the repository at this point in the history
  • Loading branch information
KumoKyaku committed Dec 27, 2023
1 parent 78ae08c commit b030411
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions Megumin.UnityPackage/Assets/TestAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class EnableTest

[Enableable]
public EnableTest EnableAttribut;
public Enable<int> EnableClassInt;

[Enum2String(typeof(LerpType))]
public string Enum2String = LerpType.Lerp.ToString();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using UnityEngine;

namespace Megumin
{
public class Matrix4x4Test : MonoBehaviour
{
[Editor]
public void Test()
{
var l2w = transform.localToWorldMatrix;
var w2l = transform.worldToLocalMatrix;
Debug.Log($"localToWorldMatrix \n{l2w}");
Debug.Log($"worldToLocalMatrix \n{w2l}");
var result1 = l2w * w2l;
var result2 = w2l * l2w;
var result3 = l2w.inverse == w2l;
var result4 = l2w == w2l.inverse;
Debug.Log($"{result1}\n ---- \n{result2}\n ---- \n{result3}\n ---- \n{result4}");
}
}
}



Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b030411

Please sign in to comment.