Vector(Double, Double) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the Vector structure.
public:
Vector(double x, double y);
public Vector (double x, double y);
new System.Windows.Vector : double * double -> System.Windows.Vector
Public Sub New (x As Double, y As Double)
Parameters
Examples
The following example shows how to create two vectors and add them together.
private Vector addTwoVectorsExample()
{
// Create two Vector structures.
Vector vector1 = new Vector(20, 30);
Vector vector2 = new Vector(45, 70);
Vector vectorResult = new Vector();
// Add the vectors together.
// vectorResult is equal to (65, 100).
vectorResult = Vector.Add(vector1, vector2);
return vectorResult;
}
Applies to
שתף איתנו פעולה ב- GitHub
ניתן למצוא את המקור לתוכן זה ב- GitHub, שם ניתן גם ליצור ולסקור בעיות ולמשוך בקשות. לקבלת מידע נוסף, עיין במדריך התורמים שלנו.