mirror of https://github.com/AxioDL/amuse.git
Update SurroundProfiles.cpp
This commit is contained in:
parent
1102d50f8f
commit
02cfa9cf39
|
@ -12,7 +12,9 @@ static float Dot(const Vector3f& a, const Vector3f& b)
|
||||||
|
|
||||||
static float Length(const Vector3f& a)
|
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 0.f;
|
||||||
return std::sqrt(Dot(a, a));
|
return std::sqrt(Dot(a, a));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue