Compartir a través de


Vector3D.Division(Vector3D, Double) Operador

Definición

Divide la estructura Vector3D especificada entre el valor escalar indicado y devuelve el resultado como una estructura 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

Estructura Vector3D que se va a dividir.

scalar
Double

Valor escalar entre el cual se va a dividir vector.

Devoluciones

Vector3D

Resultado de dividir vector entre scalar.

Ejemplos

En el ejemplo siguiente se muestra cómo usar el operador de suma sobrecargada para dividir una Vector3D 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