Partilhar via


Point4D.Add(Point4D, Point4D) Método

Definição

Adiciona uma estrutura Point4D a um Point4D.

public:
 static System::Windows::Media::Media3D::Point4D Add(System::Windows::Media::Media3D::Point4D point1, System::Windows::Media::Media3D::Point4D point2);
public static System.Windows.Media.Media3D.Point4D Add (System.Windows.Media.Media3D.Point4D point1, System.Windows.Media.Media3D.Point4D point2);
static member Add : System.Windows.Media.Media3D.Point4D * System.Windows.Media.Media3D.Point4D -> System.Windows.Media.Media3D.Point4D
Public Shared Function Add (point1 As Point4D, point2 As Point4D) As Point4D

Parâmetros

point1
Point4D

A primeira estrutura Point4D a ser adicionada.

point2
Point4D

A segunda estrutura Point4D a ser adicionada.

Retornos

Point4D

Retorna a soma de point1 e point2.

Exemplos

O exemplo a seguir mostra como adicionar duas Point4D estruturas.

// Add a Point4D to a Point4D using the overloaded + operator. 
// Returns a Point4D.

Point4D point1 = new Point4D(10, 5, 1, 4);
Point4D point2 = new Point4D(15, 40, 60, 75);
Point4D pointResult = new Point4D();

pointResult = point1 + point2;
// pointResult is equal to (25, 45, 61, 79))

// Displaying Results
syntaxString = "pointResult = point1 + point2;";
resultType = "Point4D";
operationString = "Adding a 3D Point and a 3D Vector";
ShowResults(pointResult.ToString(), syntaxString, resultType, operationString);
' Add a Point4D to a Point4D using the overloaded + operator. 
' Returns a Point4D.

Dim point1 As New Point4D(10, 5, 1, 4)
Dim point2 As New Point4D(15, 40, 60, 75)
Dim pointResult As New Point4D()

pointResult = point1 + point2
' pointResult is equal to (25, 45, 61, 79))

' Displaying Results
syntaxString = "pointResult = point1 + point2"
resultType = "Point4D"
operationString = "Adding a 3D Point and a 3D Vector"
ShowResults(pointResult.ToString(), syntaxString, resultType, operationString)

Aplica-se a

Confira também