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

Initialize this matrix using columns.
public Set ( System.Vector2 c1, System.Vector2 c2 ) : void
c1 System.Vector2
c2 System.Vector2
Результат void
Пример #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);
        }
Пример #2
0
        /// <summary>
        /// A * B
        /// </summary>
        public static Mat22 Mul(Mat22 A, Mat22 B)
        {
            Mat22 C = new Mat22();

            C.Set(Math.Mul(A, B.Col1), Math.Mul(A, B.Col2));
            return(C);
        }
Пример #3
0
        public static Mat22 Abs(Mat22 A)
        {
            Mat22 B = new Mat22();

            B.Set(Math.Abs(A.Col1), Math.Abs(A.Col2));
            return(B);
        }
Пример #4
0
        public static Mat22 operator +(Mat22 A, Mat22 B)
        {
            Mat22 result = default(Mat22);

            result.Set(A.Col1 + B.Col1, A.Col2 + B.Col2);
            return(result);
        }
Пример #5
0
        public static Mat22 Abs(Mat22 A)
        {
            Mat22 result = default(Mat22);

            result.Set(Math.Abs(A.Col1), Math.Abs(A.Col2));
            return(result);
        }
Пример #6
0
        public static Mat22 Mul(Mat22 A, Mat22 B)
        {
            Mat22 result = default(Mat22);

            result.Set(Math.Mul(A, B.Col1), Math.Mul(A, B.Col2));
            return(result);
        }
Пример #7
0
        /// <summary>
        /// A^T * B
        /// </summary>
        public static Mat22 MulT(Mat22 A, Mat22 B)
        {
            Vec2 c1 = new Vec2();

            c1.Set(Vec2.Dot(A.Col1, B.Col1), Vec2.Dot(A.Col2, B.Col1));
            Vec2 c2 = new Vec2();

            c2.Set(Vec2.Dot(A.Col1, B.Col2), Vec2.Dot(A.Col2, B.Col2));
            Mat22 C = new Mat22();

            C.Set(c1, c2);
            return(C);
        }
Пример #8
0
        public static Mat22 MulT(Mat22 A, Mat22 B)
        {
            Vec2 c = default(Vec2);

            c.Set(Vec2.Dot(A.Col1, B.Col1), Vec2.Dot(A.Col2, B.Col1));
            Vec2 c2 = default(Vec2);

            c2.Set(Vec2.Dot(A.Col1, B.Col2), Vec2.Dot(A.Col2, B.Col2));
            Mat22 result = default(Mat22);

            result.Set(c, c2);
            return(result);
        }
Пример #9
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;
		}
Пример #10
0
 /// Set this based on the position and angle.
 public void Set(Vec2 p, float angle)
 {
     Position = p;
     R.Set(angle);
 }