Example #1
0
		inline Vector2T operator / (const T Scalar) const
		{
			assert(Scalar != 0.0);

			T Inv = (T) 1.0f / Scalar;

			return Vector2T(
				X * Inv,
				Y * Inv);
		} 
Example #2
0
		inline Vector2T Rotate(const Vector2T &oVector, const T angle)
		{
			return Vector2T(oVector.X * ooge::math::Cos(angle) - oVector.Y * ooge::math::Sin(angle), oVector.X * ooge::math::Sin(angle) + oVector.Y * ooge::math::Cos(angle));
		}
Example #3
0
		inline Vector2T MidPoint(const Vector2T &oVector) const
		{
			return Vector2T((X + oVector.X) * 0.5f, (Y + oVector.Y) * 0.5f);
		}
Example #4
0
		inline Vector2T operator - () const
		{
			return Vector2T( -X, -Y);
		}
Example #5
0
		inline Vector2T operator * (const T Scalar) const
		{
			return Vector2T(
				X * Scalar,
				Y * Scalar);
		} 
Example #6
0
		inline Vector2T operator / (const Vector2T &oVector) const
		{
			return Vector2T(
				X / oVector.X,
				Y / oVector.Y);
		} 
Example #7
0
		inline Vector2T operator - (const Vector2T &oVector) const
		{
			return Vector2T(
				X - oVector.X,
				Y - oVector.Y);
		}
Example #8
0
		inline Vector2T operator * (const Vector2T &oVector) const
		{
			return Vector2T(
				X * oVector.X,
				Y * oVector.Y);
		} 
Example #9
0
		inline Vector2T operator + (const Vector2T &oVector) const
		{
			return Vector2T(
				X + oVector.X,
				Y + oVector.Y);
		}
Example #10
0
 Vector2T operator *(float s) const
 {
     return Vector2T(x * s, y * s);
 }
Example #11
0
 Vector2T operator /(float s) const
 {
     return Vector2T(x / s, y / s);
 }
Example #12
0
 Vector2T operator -(const Vector2T& v) const
 {
     return Vector2T(x - v.x, y - v.y);
 }
Example #13
0
 inline Vector2T operator +(const Vector2T& v) const
 {
     return Vector2T(x + v.x, y + v.y);
 }