Vector.Division(Vector, Double) Operatore

Definizione

Divide il vettore specificato per lo scalare specificato e restituisce il vettore risultante.

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

Parametri

vector
Vector

Vettore da dividere.

scalar
Double

Scalare dal quale saranno divisi vector.

Restituisce

Vector

Risultato della divisione di vector in base a scalar.

Esempio

Nell'esempio seguente viene illustrato come usare questo operatore (/) per dividere una Vector struttura in base a una scalare.

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

Si applica a

Vedi anche