mirror of https://github.com/AxioDL/amuse.git
Merge branch 'master' of https://github.com/AxioDL/amuse
This commit is contained in:
commit
233c53ac57
|
@ -12,7 +12,9 @@ static float Dot(const Vector3f& a, const Vector3f& b)
|
|||
|
||||
static float Length(const Vector3f& a)
|
||||
{
|
||||
if (a[0] <= FLT_EPSILON && a[1] <= FLT_EPSILON && a[2] <= FLT_EPSILON)
|
||||
if (std::fabs(a[0]) <= FLT_EPSILON &&
|
||||
std::fabs(a[1]) <= FLT_EPSILON &&
|
||||
std::fabs(a[2]) <= FLT_EPSILON)
|
||||
return 0.f;
|
||||
return std::sqrt(Dot(a, a));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue