Untitled
unknown
c_cpp
a year ago
536 B
1
Indexable
Never
matrix3 S = 3@S; float a = -S.xx; float b = -2 * S.xy; // assuming S is symmetric; otherwise adjust using S[0][1] and S[1][0] float c = -S.yy; float t1, t2; int numRoots = solvequadratic(a, b, c, t1, t2); if (numRoots == 2) { vector v1 = set(t1, 1, 0); // First asymptotic direction vector v2 = set(t2, 1, 0); // Second asymptotic direction // Normalize the vectors v1 = normalize(v1); v2 = normalize(v2); // Process the directions v1 and v2 as needed. v@a1dir=v1; }