Partilhar via


Vector3D.Division(Vector3D, Double) Operador

Definição

Divide a estrutura Vector3D especificada pelo escalar especificado e retorna o resultado como um 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

Parâmetros

vector
Vector3D

A estrutura Vector3D a ser dividida.

scalar
Double

O escalar pelo qual dividir vector.

Retornos

Vector3D

O resultado da divisão de vector por scalar.

Exemplos

O exemplo a seguir mostra como usar o operador de adição sobrecarregado para dividir uma Vector3D estrutura por um escalar.

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

Aplica-se a

Confira também