FUNCTION SMC_SolveSinCos2 : BOOL
Solves the following system of equations for alpha:
/ a b\ / sin(alpha) \ _ / c \
\-b a/ \ cos(alpha) / - \ d /
Precondition: (a,b) <> (0,0) and (c,d) <> (0,0). Returns FALSE if (and only if) the precondition does not hold.
Note: a linear equality system is solved, and if the unique non-zero solution (which exists if the precondition holds) does not have unit length, it is scaled to unit length implicitly. This means that we compute an alpha which satisfies the original equations up to a multiplicative factor in this case.
InOut:
Scope |
Name |
Type |
Comment |
Return |
SMC_SolveSinCos2 |
BOOL |
|
Input |
da |
LREAL |
The coefficients of the matrix |
db |
LREAL |
The coefficients of the matrix |
|
dc |
LREAL |
The right hand side |
|
dd |
LREAL |
The right hand side |
|
pdAlpha |
POINTER TO LREAL |
The result is written here |