Compartir vía


Vector.Division(Vector, Double) Operador

Definición

Divide el vector escalar especificado por el valor especificado y devuelve el vector 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

Vector que se va a dividir.

scalar
Double

Valor escalar por el que se dividirá el parámetro vector.

Devoluciones

Resultado de dividir vector entre scalar.

Ejemplos

En el ejemplo siguiente se muestra cómo usar este operador (/) para dividir una Vector estructura por un 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

Se aplica a

Consulte también