int solvecubic(float a, float b, float c, float d, float &t1, float &t2, float &t3)
int solvecubic(float a, float b, float c, float d, vector2 &t1, vector2 &t2, vector2 &t3)
‹a› , ‹b›, ‹c›, ‹d›がax^3 + bx^2 + cx + d = 0
の係数である3次関数を解きます。
実数解の数を返します。
実数解の場合では、その解が昇順で格納されます。解が1つだけであれば、その解が‹t1›, ‹t2›, ‹t3›に入ります。
虚数解の場合では、‹t1›, ‹t2›, ‹t3›が虚数解です。
See also | |
math |
|
solve |