Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
FindRoot.h File Reference

Go to the source code of this file.

Functions

template<typename T >
JPH_NAMESPACE_BEGIN int FindRoot (const T inA, const T inB, const T inC, T &outX1, T &outX2)
 

Function Documentation

◆ FindRoot()

template<typename T >
JPH_NAMESPACE_BEGIN int FindRoot ( const T  inA,
const T  inB,
const T  inC,
T &  outX1,
T &  outX2 
)
inline

Find the roots of \(inA \: x^2 + inB \: x + inC = 0\).

Returns
The number of roots, actual roots in outX1 and outX2. If number of roots returned is 1 then outX1 == outX2.