共用方式為


Vector.Divide(Vector, Double) 方法

定義

將指定的向量除以指定的純量,並傳回結果做為 Vector

public:
 static System::Windows::Vector Divide(System::Windows::Vector vector, double scalar);
public static System.Windows.Vector Divide (System.Windows.Vector vector, double scalar);
static member Divide : System.Windows.Vector * double -> System.Windows.Vector
Public Shared Function Divide (vector As Vector, scalar As Double) As Vector

參數

vector
Vector

要被除的向量結構。

scalar
Double

vector 要除以的數量。

傳回

Vector

vector 除以 scalar 的結果。

範例

下列範例示範如何使用這個方法來除 Vector 以純量。

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

    // Divide vector by scalar.
    // vectorResult is approximately equal to (0.26667,0.4)
    vectorResult = Vector.Divide(vector1, scalar1);

    return vectorResult;
}

適用於

另請參閱