Compartilhar via


Vector.Division(Vector, Double) Operador

Definição

Divide o vetor especificado pelo escalar especificado e retorna o vetor resultante.

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

Parâmetros

vector
Vector

O vetor a ser dividido.

scalar
Double

O escalar pelo qual vector será dividido.

Retornos

Vector

O resultado da divisão de vector por scalar.

Exemplos

O exemplo a seguir mostra como usar esse operador (/) para dividir uma Vector 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