共用方式為


Vector3D.Division(Vector3D, Double) 運算子

定義

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

public:
 static System::Windows::Media::Media3D::Vector3D operator /(System::Windows::Media::Media3D::Vector3D vector, double scalar);
public static System.Windows.Media.Media3D.Vector3D operator / (System.Windows.Media.Media3D.Vector3D vector, double scalar);
static member ( / ) : System.Windows.Media.Media3D.Vector3D * double -> System.Windows.Media.Media3D.Vector3D
Public Shared Operator / (vector As Vector3D, scalar As Double) As Vector3D

參數

vector
Vector3D

要相除的 Vector3D 結構。

scalar
Double

用來與 vector 相除的純量 (除數)。

傳回

Vector3D

vector 除以 scalar 的結果。

範例

下列範例示範如何使用多載加法運算子,將結構除 Vector3D 以純量。

private Vector overloadedDivisionOperatorExample()
{
    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 = vector1 / scalar1;

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

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

    Return vectorResult

End Function

適用於

另請參閱