diff options
| author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-15 20:39:00 +0100 | 
|---|---|---|
| committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-15 20:39:00 +0100 | 
| commit | 230314ac71a055458d9bff4fae744b8e25f7ada2 (patch) | |
| tree | 35bcab18d57eda2c5f3665e287b06b2d8b7060cd /indra/llmath | |
| parent | 90800c84c4836d2eb0425ed09b7dd83e86a106db (diff) | |
| parent | 12dadac44e9d5af8728e7bedab586683b2660cb4 (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 f9f1c024f2..ae26c85ce4 100644 --- a/indra/llmath/v2math.h +++ b/indra/llmath/v2math.h @@ -73,6 +73,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 @@ -218,6 +220,7 @@ inline void	LLVector2::setVec(const F32 *vec)  	mV[VY] = vec[VY];  } +  // LLVector2 Magnitude and Normalization Functions  inline F32 LLVector2::length(void) const @@ -250,6 +253,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  { | 
