Peds, mission switcher & fixes
This commit is contained in:
@@ -134,6 +134,18 @@ public:
|
||||
return *str2 != '\0';
|
||||
}
|
||||
|
||||
static bool SolveQuadratic(float a, float b, float c, float &root1, float &root2)
|
||||
{
|
||||
float discriminant = b * b - 4.f * a * c;
|
||||
if (discriminant < 0.f)
|
||||
return false;
|
||||
|
||||
float discriminantSqrt = Sqrt(discriminant);
|
||||
root2 = (-b + discriminantSqrt) / (2.f * a);
|
||||
root1 = (-b - discriminantSqrt) / (2.f * a);
|
||||
return true;
|
||||
}
|
||||
|
||||
// not too sure about all these...
|
||||
static uint16 GetRandomNumber(void)
|
||||
{ return myrand() & MYRAND_MAX; }
|
||||
|
||||
Reference in New Issue
Block a user