Partager via


Vector3D.Division(Vector3D, Double) Opérateur

Définition

Divise la structure Vector3D spécifiée par la scalaire indiquée et retourne le résultat sous forme de 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

Paramètres

vector
Vector3D

Structure Vector3D à diviser.

scalar
Double

Scalaire par laquelle diviser vector.

Retours

Vector3D

Résultat de la division de vector par scalar.

Exemples

L’exemple suivant montre comment utiliser l’opérateur d’ajout surchargé pour diviser une Vector3D structure par un scalaire.

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

S’applique à

Voir aussi