示例#1
0
        public static void Rot12(SMat3 m, float c, float s)
        {
            float [] cs  = Svd.CalcSymmetricGivensCoefficients(m.m11, m.m12, m.m22, c, s);
            float    cc  = cs[0] * cs[0];
            float    ss  = cs[1] * cs[1];
            float    mix = 2 * c * s * m.m12;

            m.SetSymmetric(m.m00, c * m.m01 - s * m.m02, s * m.m01 + c * m.m02,
                           cc * m.m11 - mix + ss * m.m22, 0, ss * m.m11 + mix + cc * m.m22);
        }
示例#2
0
        public static void Rot01(SMat3 m, float c, float s)
        {
            float [] cs  = Svd.CalcSymmetricGivensCoefficients(m.m00, m.m01, m.m11, c, s);
            float    cc  = cs[0] * cs[0];
            float    ss  = cs[1] * cs[1];
            float    mix = 2 * c * s * m.m01;

            m.SetSymmetric(cc * m.m00 - mix + ss * m.m11, 0, c * m.m02 - s * m.m12,
                           ss * m.m00 + mix + cc * m.m11, s * m.m02 + c * m.m12, m.m22);
        }