diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-19 14:30:43 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-19 14:30:43 +0100 |
commit | b362cc60d9f458626bc69873c5801b3dbd25aae3 (patch) | |
tree | 8c59c292a89a0b380e61d5e4f7083240c56192f0 /indra/llmath | |
parent | f3d4648ef5c670d519945ca72958e161d5aa12f4 (diff) | |
parent | 532d732645f2369d17eba9c2ed0d594b486d416e (diff) |
merge from viewer-trunk
Diffstat (limited to 'indra/llmath')
-rw-r--r-- | indra/llmath/v2math.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/llmath/v2math.h b/indra/llmath/v2math.h index 9fef8851cc..65f3714313 100644 --- a/indra/llmath/v2math.h +++ b/indra/llmath/v2math.h @@ -70,6 +70,8 @@ class LLVector2 void setVec(const LLVector2 &vec); // deprecated void setVec(const F32 *vec); // deprecated + inline bool isFinite() const; // checks to see if all values of LLVector2 are finite + F32 length() const; // Returns magnitude of LLVector2 F32 lengthSquared() const; // Returns magnitude squared of LLVector2 F32 normalize(); // Normalizes and returns the magnitude of LLVector2 @@ -215,6 +217,7 @@ inline void LLVector2::setVec(const F32 *vec) mV[VY] = vec[VY]; } + // LLVector2 Magnitude and Normalization Functions inline F32 LLVector2::length(void) const @@ -247,6 +250,12 @@ inline F32 LLVector2::normalize(void) return (mag); } +// checker +inline bool LLVector2::isFinite() const +{ + return (llfinite(mV[VX]) && llfinite(mV[VY])); +} + // deprecated inline F32 LLVector2::magVec(void) const { |