summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWoazboat <f.kargl@posteo.de>2015-04-29 01:37:16 +0200
committerWoazboat <f.kargl@posteo.de>2015-04-29 01:37:16 +0200
commitca5b3e5776c05a94c86b28b86227d90b8cef43c6 (patch)
tree281ad82c23afd8b15e2991137cc4d8e7333ebd59 /src
parentFix HasNonZeroLength name (diff)
downloadcuberite-ca5b3e5776c05a94c86b28b86227d90b8cef43c6.tar
cuberite-ca5b3e5776c05a94c86b28b86227d90b8cef43c6.tar.gz
cuberite-ca5b3e5776c05a94c86b28b86227d90b8cef43c6.tar.bz2
cuberite-ca5b3e5776c05a94c86b28b86227d90b8cef43c6.tar.lz
cuberite-ca5b3e5776c05a94c86b28b86227d90b8cef43c6.tar.xz
cuberite-ca5b3e5776c05a94c86b28b86227d90b8cef43c6.tar.zst
cuberite-ca5b3e5776c05a94c86b28b86227d90b8cef43c6.zip
Diffstat (limited to 'src')
-rw-r--r--src/Tracer.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/Tracer.cpp b/src/Tracer.cpp
index 097726278..249d2a6d1 100644
--- a/src/Tracer.cpp
+++ b/src/Tracer.cpp
@@ -12,17 +12,17 @@
-const float FLOAT_EPSILON = 0.0001f; //TODO: Stash this in some header where it can be reused
+const float FLOAT_EPSILON = 0.0001f; // TODO: Stash this in some header where it can be reused
const std::array<const Vector3f, 6> cTracer::m_NormalTable =
{
- Vector3f(-1, 0, 0), // 1: -x
- Vector3f( 0, 0, -1), // 2: -z
- Vector3f( 1, 0, 0), // 3: +x
- Vector3f( 0, 0, 1), // 4: +z
- Vector3f( 0, 1, 0), // 5: +y
- Vector3f( 0, -1, 0) // 6: -y
+ Vector3f(-1, 0, 0), // 1: -x
+ Vector3f( 0, 0, -1), // 2: -z
+ Vector3f( 1, 0, 0), // 3: +x
+ Vector3f( 0, 0, 1), // 4: +z
+ Vector3f( 0, 1, 0), // 5: +y
+ Vector3f( 0, -1, 0) // 6: -y
};
@@ -120,7 +120,7 @@ void cTracer::SetValues(const Vector3f & a_Start, const Vector3f & a_Direction)
}
else
{
- tMax.x = (static_cast<float>(pos.x + 1) - a_Start.x) / dir.x; //TODO: Possible division by zero
+ tMax.x = (static_cast<float>(pos.x + 1) - a_Start.x) / dir.x; // TODO: Possible division by zero
}
if (dir.y < 0)
@@ -129,7 +129,7 @@ void cTracer::SetValues(const Vector3f & a_Start, const Vector3f & a_Direction)
}
else
{
- tMax.y = (static_cast<float>(pos.y + 1) - a_Start.y) / dir.y; //TODO: Possible division by zero
+ tMax.y = (static_cast<float>(pos.y + 1) - a_Start.y) / dir.y; // TODO: Possible division by zero
}
if (dir.z < 0)
@@ -138,7 +138,7 @@ void cTracer::SetValues(const Vector3f & a_Start, const Vector3f & a_Direction)
}
else
{
- tMax.z = (static_cast<float>(pos.z + 1) - a_Start.z) / dir.z; //TODO: Possible division by zero
+ tMax.z = (static_cast<float>(pos.z + 1) - a_Start.z) / dir.z; // TODO: Possible division by zero
}
}
@@ -165,7 +165,7 @@ bool cTracer::Trace(const Vector3f & a_Start, const Vector3f & a_Direction, int
if (End.y < 0)
{
- float dist = -a_Start.y / dir.y; // No division by 0 possible
+ float dist = -a_Start.y / dir.y; // No division by 0 possible
End = a_Start + (dir * dist);
}