Box2DX.Common.Vec2.Dot C# (CSharp) Method

Dot() public static method

Peform the dot product on two vectors.
public static Dot ( Vec2 a, Vec2 b ) : float
a Vec2
b Vec2
return float
        public static float Dot(Vec2 a, Vec2 b)
        {
            return a.X * b.X + a.Y * b.Y;
        }

Usage Example

示例#1
0
文件: Math.cs 项目: vb0067/LGame
 /// <summary>
 /// Multiply a matrix transpose times a vector. If a rotation matrix is provided,
 /// then this transforms the vector from one frame to another (inverse transform).
 /// </summary>
 public static Vec2 MulT(Mat22 A, Vec2 v)
 {
     return(new Vec2(Vec2.Dot(v, A.Col1), Vec2.Dot(v, A.Col2)));
 }
All Usage Examples Of Box2DX.Common.Vec2::Dot