Vector2d Class
Public Class Vector2d
This language is not supported or no code example is available.
public class Vector2d
This language is not supported or no code example is available.
public ref class Vector2d
This language is not supported or no code example is available.
Name | Description | |
---|---|---|
Vector2d() | Creates a zero length vector | |
Vector2d(Point2d, Point2d) | Creates a vector that represents the translation from a point to another. | |
Vector2d(Point2d) | Creates a vector taking x,y from the point | |
Vector2d(Vector2d) | Copy constructor. | |
Vector2d(double, double) | Creates a vector with x and y as data. |
Name | Description | |
---|---|---|
Angle | Gets the angle of the vector. | |
LeftNormal | Gets the normal on the left side of this vector as a new vector that has the same length as this one. This means: Vector2d(1,0).LeftNormal equals Vector2d(0,1) | |
Length | Gets or sets the length of the vector. | |
RightNormal | Gets the normal on the right side of this vector as a new vector that has the same length as this one. This means: Vector2d(1,0).LeftNormal equals Vector2d(0,-1) | |
SquaredLength | Gets the The squared length of the vector. This is faster than than getting it's actual length. | |
XAxis | ||
YAxis |
Name | Description | |
---|---|---|
AngleCCW(Vector2d) | Computes the counter clockwise angle from this vector to another. | |
AngleCW(Vector2d) | Computes the clockwise angle from this vector to another. | |
CreateFromAngle(double) | Creates a unit vector with a given angle. | |
CreateFromAngleAndLength(double, double) | Creates a vector with a given angle and length. | |
Cross(Vector2d) | ||
DifferentialAngle(Vector2d) | Computes the angular difference from this vector to another in the range -PI to +PI. | |
DirectionalWith(Vector2d, double) | Checks if the vector has the same direction as another with a given tolerance. | |
DotProduct(Vector2d) | Computes the dot product between this vector and another. If the vectors are normalized this is the same as cosine of the smallest angle between vectors. | |
Equals(Vector2d, double) | Checks if this vector is about the same as another with a given tolerance. | |
GetBisector(Vector2d) | ||
Normalize() | Normalizes the vector in-place, which means making its length 1.0 maintaining its angle. If the vectors length is 0.0 an exception is thrown. | |
ParallelWith(Vector2d, double) | Checks if the vector is parallel with another with a given tolerance. | |
PerpendicularDotProduct(Vector2d) | Computes the dot product of the vector perpendicular with this one and another. If the vectors are normalized this is the same as sine of the smallest angle between vectors. | |
Rotate(double) | ||
Rotate270() | ||
Rotate90() | ||
SmallestAngle(Vector2d) | Returns the angle between this vector and another. Tha angle returned is always the one less then PI. | |
ToPoint() | Create a point (x,y) from the vector components (x,y). | |
ToString() | Creates a string representation of the vector suitable for debugging. | |
Transform(Matrix2d) | Transforms the vector in-place with a matrix. When transforming a vector, the translation portion of the matrix is ignored, just scaling and rotation is considered. |
Name | Description | |
---|---|---|
Addition | Creates a new vector that is a sum of two others. | |
Division | Divides the length of the vector with a factor (scales it) | |
Multiply | Multiplies the length of the vector with a factor (scales it) | |
Multiply | Multiplies the length of the vector with a factor (scales it) | |
Subtraction | Subtracts a vector from another into a new vector. | |
UnaryNegation | Computes the negation of a vector into a new vector. |
IGS.Genamo.Vector2d