Vector.Multiply 연산자
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
오버로드
| Name | Description |
|---|---|
| Multiply(Vector, Matrix) |
지정된 벡터의 좌표 공간을 지정된 벡터로 변환합니다 Matrix. |
| Multiply(Vector, Vector) |
지정된 두 벡터 구조체의 점 곱을 계산하고 결과를 Double로 반환합니다. |
| Multiply(Double, Vector) |
지정된 스칼라를 지정된 벡터로 곱하고 결과 벡터를 반환합니다. |
| Multiply(Vector, Double) |
지정된 벡터를 지정된 스칼라로 곱하고 결과 벡터를 반환합니다. |
Multiply(Vector, Matrix)
지정된 벡터의 좌표 공간을 지정된 벡터로 변환합니다 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
Public Shared Operator * (vector As Vector, matrix As Matrix) As Vector
매개 변수
- vector
- Vector
변환할 벡터입니다.
- matrix
- Matrix
적용할 변환입니다 vector.
반품
에 의한 vector변환 matrix 의 결과입니다.
예제
다음 예제에서는 이 연산자(*)를 사용하여 구조체를 Vector 구조체로 곱하는 방법을 보여 줍니다 Matrix .
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)
지정된 두 벡터 구조체의 점 곱을 계산하고 결과를 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
곱할 첫 번째 벡터입니다.
- vector2
- Vector
곱할 두 번째 벡터입니다.
반품
Double 다음 수식을 사용하여 계산되는 스칼라 도트 곱 vector1 과 vector2다음을 포함하는 값을 반환합니다.
vector1.X * vector2.X + vector1.Y * vector2.Y
예제
다음 예제에서는 이 연산자(*)를 사용하여 구조체를 Vector 곱하는 방법을 보여 줍니다 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)
지정된 스칼라를 지정된 벡터로 곱하고 결과 벡터를 반환합니다.
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
Public Shared Operator * (scalar As Double, vector As Vector) As Vector
매개 변수
- scalar
- Double
곱할 스칼라입니다.
- vector
- Vector
곱할 벡터입니다.
반품
곱하기 scalar 및 vector.
예제
다음 예제에서는 이 연산자(*)를 사용하여 스칼라를 구조체로 Vector 곱하는 방법을 보여 줍니다.
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)
지정된 벡터를 지정된 스칼라로 곱하고 결과 벡터를 반환합니다.
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
Public Shared Operator * (vector As Vector, scalar As Double) As Vector
매개 변수
- vector
- Vector
곱할 벡터입니다.
- scalar
- Double
곱할 스칼라입니다.
반품
곱하기 vector 및 scalar.
예제
다음 예제에서는 이 연산자(*)를 사용하여 구조체를 Vector 스칼라로 곱하는 방법을 보여 줍니다.
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