Esempio n. 1
0
		/// <summary> Constructs and initializes a Vector2f from the specified Vector2f.</summary>
		/// <param name="v1">the Vector2f containing the initialization x y data
		/// </param>
		public Vector2f(Vector2f v1):base(v1)
		{
		}
Esempio n. 2
0
		/// <summary> Sets the value of this vector to the normalization of vector v1.</summary>
		/// <param name="v1">the un-normalized vector
		/// </param>
		public void  normalize(Vector2f v1)
		{
			set_Renamed(v1);
			normalize();
		}
Esempio n. 3
0
		/// <summary> Returns the angle in radians between this vector and
		/// the vector parameter; the return value is constrained to the
		/// range [0,PI].
		/// </summary>
		/// <param name="v1"> the other vector
		/// </param>
		/// <returns> the angle in radians in the range [0,PI]
		/// </returns>
		public float angle(Vector2f v1)
		{
			// stabler than acos
			//UPGRADE_WARNING: Data types in Visual C# might be different.  Verify the accuracy of narrowing conversions. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1042'"
			return (float) System.Math.Abs(System.Math.Atan2(x * v1.y - y * v1.x, dot(v1)));
		}
Esempio n. 4
0
		/// <summary> Computes the dot product of the this vector and vector v1.</summary>
		/// <param name="v1">the other vector
		/// </param>
		public float dot(Vector2f v1)
		{
			return x * v1.x + y * v1.y;
		}