18 template <
typename Real>
30 void operator()(Real a00, Real a01, Real a11,
int sortType,
31 std::array<Real, 2>& eval,
std::array<std::array<Real, 2>, 2>& evec)
36 template <
typename Real>
38 int sortType, std::array<Real, 2>& eval,
39 std::array<std::array<Real, 2>, 2>& evec)
const 43 Real
const zero = (Real)0, one = (Real)1, half = (Real)0.5;
44 Real c2 = half * (a00 - a11), s2 = a01;
46 if (maxAbsComp > zero)
50 Real
length = sqrt(c2 * c2 + s2 * s2);
65 Real
s = sqrt(half * (one - c2));
66 Real
c = half * s2 /
s;
69 Real csqr = c *
c, ssqr = s *
s, mid = s2 * a01;
70 diagonal[0] = csqr * a00 + mid + ssqr * a11;
71 diagonal[1] = csqr * a11 - mid + ssqr * a00;
73 if (sortType == 0 || sortType * diagonal[0] <= sortType * diagonal[1])
75 eval[0] = diagonal[0];
76 eval[1] = diagonal[1];
84 eval[0] = diagonal[1];
85 eval[1] = diagonal[0];
void operator()(Real a00, Real a01, Real a11, int sortType, std::array< Real, 2 > &eval, std::array< std::array< Real, 2 >, 2 > &evec) const
gte::BSNumber< UIntegerType > abs(gte::BSNumber< UIntegerType > const &number)
GLuint GLsizei GLsizei * length