sphere: give data members proper names

This commit is contained in:
Danny Robson 2015-04-15 14:29:20 +10:00
parent fb97584ad6
commit 3decd9e0ab
2 changed files with 4 additions and 4 deletions

View File

@ -82,8 +82,8 @@ template <size_t S, typename T>
T
util::ray<S,T>::intersect (sphere<S,T> s) const
{
T b = dot (direction, origin - s.c);
T c = dot (origin - s.c, origin - s.c) - s.r * s.r;
T b = dot (direction, origin - s.centre);
T c = dot (origin - s.centre, origin - s.centre) - s.radius * s.radius;
T D = b * b - c;
if (D < 0)

View File

@ -22,8 +22,8 @@
namespace util {
template <size_t S, typename T>
struct sphere {
point<S,T> c;
T r;
point<S,T> centre;
T radius;
};
typedef sphere<3,float> sphere3f;