Box2DX.Common.Mat22.Set C# (CSharp) Метод

Set() публичный Метод

Initialize this matrix using an angle. This matrix becomes an orthonormal rotation matrix.
public Set ( float angle ) : void
angle float
Результат void
        public void Set(float angle)
        {
            float c = Mathf.Cos(angle);
            float s = Mathf.Sin(angle);
            Col1.x = c; Col2.x = -s;
            Col1.y = s; Col2.y = c;
        }

Same methods

Mat22::Set ( System.Vector2 c1, System.Vector2 c2 ) : void

Usage Example

Пример #1
0
        public static Mat22 operator +(Mat22 A, Mat22 B)
        {
            Mat22 C = new Mat22();

            C.Set(A.Col1 + B.Col1, A.Col2 + B.Col2);
            return(C);
        }
All Usage Examples Of Box2DX.Common.Mat22::Set