Box2DX.Common.Vec2.Dot C# (CSharp) Метод

Dot() публичный статический Метод

Peform the dot product on two vectors.
public static Dot ( Vec2 a, Vec2 b ) : float
a Vec2
b Vec2
Результат float
        public static float Dot(Vec2 a, Vec2 b)
        {
            return a.X * b.X + a.Y * b.Y;
        }

Usage Example

Пример #1
0
 /// <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