Version: 2020.2
public float determinant ;

描述

矩阵的行列式。(只读)

无法对行列式为零的矩阵求逆。

using UnityEngine;

public class ExampleScript : MonoBehaviour { void Update() { // create a transformation matrix with scale, zero position and no rotation var scale = new Vector3(5,3,2); var matrix = Matrix4x4.TRS(Vector3.zero, Quaternion.identity, scale);

// determinant of a scaled matrix is volume of the parallelepiped // formed from its axes, in this case 5*3*2=30 Debug.Log(matrix.determinant); } }

请参阅 Wikipedia 上的行列式以了解更多详细信息。

另请参阅:inverse 属性、Inverse3DAffine 方法。

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961