Skip to content

Commit

Permalink
Remove unused Vector3::isValid()
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Mott committed Apr 4, 2021
1 parent 92b0103 commit 72450cf
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions libs/math/Vector3.h
Expand Up @@ -35,9 +35,7 @@ class BasicVector3
// Public typedef to read the type of our elements
typedef T ElementType;

/**
* Default constructor. Initialise Vector with all zeroes.
*/
/// Initialise Vector with all zeroes.
BasicVector3()
{
_v[0] = 0;
Expand All @@ -52,8 +50,10 @@ class BasicVector3
z() = z_;
}

/** Construct a BasicVector3 from a 3-element array. The array must be
* valid as no bounds checking is done.
/**
* \brief Construct a BasicVector3 from a 3-element array.
*
* The array must be valid as no bounds checking is done.
*/
BasicVector3(const T* array)
{
Expand All @@ -73,22 +73,13 @@ class BasicVector3
);
}

/** Set all 3 components to the provided values.
*/
/// Set all 3 components to the provided values.
void set(const T& x, const T& y, const T& z) {
_v[0] = x;
_v[1] = y;
_v[2] = z;
}

/**
* Check if this Vector is valid. A Vector is invalid if any of its
* components are NaN.
*/
bool isValid() const {
return !isnan(_v[0]) && !isnan(_v[1]) && !isnan(_v[2]);
}

// Return NON-CONSTANT references to the vector components
T& x() { return _v[0]; }
T& y() { return _v[1]; }
Expand Down

0 comments on commit 72450cf

Please sign in to comment.