Vector.Multiply Vector.Multiply Vector.Multiply Vector.Multiply Operator

定義

オーバーロード

Multiply(Vector, Matrix) Multiply(Vector, Matrix) Multiply(Vector, Matrix)

指定したベクターの座標空間を、指定した Matrix を使用して変換します。Transforms the coordinate space of the specified vector using the specified Matrix.

Multiply(Vector, Vector) Multiply(Vector, Vector) Multiply(Vector, Vector) Multiply(Vector, Vector)

2 つの指定したベクター構造体のドット積を計算し、その結果を Double として返します。Calculates the dot product of the two specified vector structures and returns the result as a Double.

Multiply(Double, Vector) Multiply(Double, Vector) Multiply(Double, Vector)

指定したスカラーと指定したベクターを乗算し、その結果のベクターを返します。Multiplies the specified scalar by the specified vector and returns the resulting vector.

Multiply(Vector, Double) Multiply(Vector, Double) Multiply(Vector, Double)

指定したベクターと指定したスカラーを乗算し、その結果のベクターを返します。Multiplies the specified vector by the specified scalar and returns the resulting vector.

Multiply(Vector, Matrix) Multiply(Vector, Matrix) Multiply(Vector, Matrix)

指定したベクターの座標空間を、指定した Matrix を使用して変換します。Transforms the coordinate space of the specified vector using the specified Matrix.

public:
 static System::Windows::Vector operator *(System::Windows::Vector vector, System::Windows::Media::Matrix matrix);
public static System.Windows.Vector operator * (System.Windows.Vector vector, System.Windows.Media.Matrix matrix);
static member ( * ) : System.Windows.Vector * System.Windows.Media.Matrix -> System.Windows.Vector

パラメーター

vector
Vector Vector Vector Vector

変換するベクトル。The vector to transform.

matrix
Matrix Matrix Matrix Matrix

vector に適用する変換。The transformation to apply to vector.

戻り値

vectormatrix で変換した結果。The result of transforming vector by matrix.

次の例では、この演算子 (*) を使用して乗算する方法を示しています、Vectorで構造体、Matrix構造体。The following example shows how to use this operator (*) to multiply a Vector structure by a Matrix structure.

private Vector overloadedMultiplyVectorByMatrixOperatorExample()
{
    Vector vector1 = new Vector(20, 30);
    Matrix matrix1 = new Matrix(40, 50, 60, 70, 80, 90);
    Vector vectorResult = new Vector();

    // Multiply the vector and matrix.
    // vectorResult is equal to (2600,3100).
    vectorResult = vector1 * matrix1;

    return vectorResult;

}
Private Function overloadedMultiplyVectorByMatrixOperatorExample() As Vector
	Dim vector1 As New Vector(20, 30)
	Dim matrix1 As New Matrix(40, 50, 60, 70, 80, 90)
	Dim vectorResult As New Vector()

	' Multiply the vector and matrix.
	' vectorResult is equal to (2600,3100).
	vectorResult = vector1 * matrix1

	Return vectorResult

End Function
こちらもご覧ください

Multiply(Vector, Vector) Multiply(Vector, Vector) Multiply(Vector, Vector) Multiply(Vector, Vector)

2 つの指定したベクター構造体のドット積を計算し、その結果を Double として返します。Calculates the dot product of the two specified vector structures and returns the result as a Double.

public:
 static double operator *(System::Windows::Vector vector1, System::Windows::Vector vector2);
public static double operator * (System.Windows.Vector vector1, System.Windows.Vector vector2);
static member ( * ) : System.Windows.Vector * System.Windows.Vector -> double
Public Shared Operator * (vector1 As Vector, vector2 As Vector) As Double

パラメーター

vector1
Vector Vector Vector Vector

乗算する最初のベクター。The first vector to multiply.

vector2
Vector Vector Vector Vector

乗算する 2 番目のベクター。The second vector to multiply.

戻り値

次の数式で計算された vector1vector2 のスカラー ドット積を含む Double を返します。Returns a Double containing the scalar dot product of vector1 and vector2, which is calculated using the following formula: vector1.X * vector2.X + vector1.Y * vector2.Yvector1.X * vector2.X + vector1.Y * vector2.Y

次の例では、この演算子 (*) を使用して乗算する方法を示しています、Vectorで構造体、Vectorします。The following example shows how to use this operator (*) to multiply a Vector structure by a Vector.

private Double overloadedOperatorGetDotProductExample()
{
    Vector vector1 = new Vector(20, 30);
    Vector vector2 = new Vector(45, 70);

    // Return the dot product of the two specified vectors
    // using the overloaded "*" operator.
    // The dot product is calculated using the following 
    // formula: (vector1.X * vector2.X) + (vector1.Y * vector2.Y).
    // doubleResult is equal to 3000
    Double doubleResult = Vector.Multiply(vector1, vector2);

    return doubleResult;

}
Private Function overloadedOperatorGetDotProductExample() As Double
	Dim vector1 As New Vector(20, 30)
	Dim vector2 As New Vector(45, 70)

	' Return the dot product of the two specified vectors
	' using the overloaded "*" operator.
	' The dot product is calculated using the following 
	' formula: (vector1.X * vector2.X) + (vector1.Y * vector2.Y).
	' doubleResult is equal to 3000
	Dim doubleResult As Double = Vector.Multiply(vector1, vector2)

	Return doubleResult

End Function
こちらもご覧ください

Multiply(Double, Vector) Multiply(Double, Vector) Multiply(Double, Vector)

指定したスカラーと指定したベクターを乗算し、その結果のベクターを返します。Multiplies the specified scalar by the specified vector and returns the resulting vector.

public:
 static System::Windows::Vector operator *(double scalar, System::Windows::Vector vector);
public static System.Windows.Vector operator * (double scalar, System.Windows.Vector vector);
static member ( * ) : double * System.Windows.Vector -> System.Windows.Vector

パラメーター

scalar
Double Double Double Double

乗算するスカラー。The scalar to multiply.

vector
Vector Vector Vector Vector

乗算するベクトル。The vector to multiply.

戻り値

scalarvector を乗算した結果。The result of multiplying scalar and vector.

次の例では、この演算子 (*) を使用してスカラーを乗算する方法を示していますが、Vector構造体。The following example shows how to use this operator (*) to multiply a scalar by a Vector structure.

private Vector overloadedMultiplicationOperatorExample2()
{
    Vector vector1 = new Vector(20, 30);
    Double scalar1 = 75;

    // vectorResult is equal to (1500,2250)
    Vector vectorResult = scalar1 * vector1;

    return vectorResult;

}
Private Function overloadedMultiplicationOperatorExample2() As Vector
	Dim vector1 As New Vector(20, 30)
	Dim scalar1 As Double = 75

	' vectorResult is equal to (1500,2250)
	Dim vectorResult As Vector = scalar1 * vector1

	Return vectorResult

End Function
こちらもご覧ください

Multiply(Vector, Double) Multiply(Vector, Double) Multiply(Vector, Double)

指定したベクターと指定したスカラーを乗算し、その結果のベクターを返します。Multiplies the specified vector by the specified scalar and returns the resulting vector.

public:
 static System::Windows::Vector operator *(System::Windows::Vector vector, double scalar);
public static System.Windows.Vector operator * (System.Windows.Vector vector, double scalar);
static member ( * ) : System.Windows.Vector * double -> System.Windows.Vector

パラメーター

vector
Vector Vector Vector Vector

乗算するベクトル。The vector to multiply.

scalar
Double Double Double Double

乗算するスカラー。The scalar to multiply.

戻り値

vectorscalar を乗算した結果。The result of multiplying vector and scalar.

次の例では、この演算子 (*) を使用して乗算する方法を示しています、Vectorはスカラーによる構造体。The following example shows how to use this operator (*) to multiply a Vector structure by a scalar.

private Vector overloadedMultiplicationOperatorExample1()
{
    Vector vector1 = new Vector(20, 30);
    Double scalar1 = 75;

    // vectorResult is equal to (1500,2250)
    Vector vectorResult = vector1 * scalar1;

    return vectorResult;
    
}
Private Function overloadedMultiplicationOperatorExample1() As Vector
	Dim vector1 As New Vector(20, 30)
	Dim scalar1 As Double = 75

	' vectorResult is equal to (1500,2250)
	Dim vectorResult As Vector = vector1 * scalar1

	Return vectorResult

End Function
こちらもご覧ください

適用対象