A class that represents 2 dimentional double point precision vectors, as well as the math for it.

C# | Visual Basic | Visual Basic Usage | Visual C++ | J# | JScript |
public class Vector2D
Public Class Vector2D
Dim instance As Vector2D
public ref class Vector2D
public class Vector2D
public class Vector2D
TenneySoftware.Vectors.Vector2D = function(); Type.createClass( 'TenneySoftware.Vectors.Vector2D');

All Members | Constructors | Methods | Properties | ||
Icon | Member | Description |
---|---|---|
![]() | Vector2D()()() |
Default constructor for Vector2D class.
|
![]() | Vector2D(Double, Double) |
Constructor for Vector2D class that takes initial parameters.
|
![]() | Add(Vector2D) |
Adds a vector to the current one.
|
![]() ![]() | Addition(Vector2D, Vector2D) |
Adds two vectors together.
|
![]() ![]() | Center | |
![]() | Converted | |
![]() | ConvertToPoint()()() |
Converts the 2D vector to a 2D integer point.
|
![]() ![]() | ConvertToPoint(Vector2D) |
Converts the 2D vector to a 2D integer point.
|
![]() | ConvertToVector3D()()() |
Converts the 2D vector to a 3D vector. Adds Z = 0.
|
![]() ![]() | ConvertToVector3D(Vector2D) |
Converts the 2D vector to a 3D vector. Adds Z = 0.
|
![]() ![]() | degToRads(Double) | |
![]() | Distance(Vector2D) |
Caluclates the distance seperating two vectors.
|
![]() ![]() | Distance(Vector2D, Vector2D) |
Calculates the distance seperating two vectors.
|
![]() | Divide(Double) |
Divides a divisor to the current vector.
|
![]() ![]() | Division(Vector2D, Double) |
Divides a vector by a divisor.
|
![]() | DotProduct(Vector2D) |
Calculates the dot product of two vectors.
|
![]() ![]() | DotProduct(Vector2D, Vector2D) |
Calculates the dot product of two vectors.
|
![]() ![]() | Equality(Vector2D, Vector2D) |
Compares two vectors to determine if they are equal.
|
![]() | Equals(Object) |
Compares object to current vector to determine if they are equal.
(Overrides Object.Equals(Object).) |
![]() | GetHashCode()()() |
Generates a unique code for current vector.
(Overrides Object.GetHashCode()()().) |
![]() ![]() | Inequality(Vector2D, Vector2D) |
Compares two vectors to determine if they are not equal.
|
![]() | IsEmpty()()() |
Determines if vector is empty, contains X=0, Y=0.
|
![]() | Magnitude()()() |
Calculates the magnitude, length, norm of a vector.
|
![]() ![]() | Magnitude(Vector2D) |
Calculates the magnitude, length, norm of a vector.
|
![]() ![]() | Multiply(Vector2D, Double) |
Multiplies a vector by a scalar.
|
![]() ![]() | Multiply(Double, Vector2D) |
Multiplies a vector by a scalar.
|
![]() | Multiply(Double) |
Multiplies a scalar to the current vector.
|
![]() | Normalize()()() |
Normalizes vector. Determines direction of vector.
|
![]() ![]() | Normalize(Vector2D) |
Normalizes vector. Determines direction of vector.
|
![]() ![]() | radsToDeg(Double) | |
![]() | rotateDeg(Double) | |
![]() ![]() | rotateDeg(Vector2D, Double) | |
![]() | rotateDegOrigin(Vector2D, Double) | |
![]() ![]() | rotateDegOrigin(Vector2D, Vector2D, Double) | |
![]() | rotateRads(Double) | |
![]() ![]() | rotateRads(Vector2D, Double) | |
![]() | rotateRadsOrigin(Vector2D, Double) | |
![]() ![]() | rotateRadsOrigin(Vector2D, Vector2D, Double) | |
![]() ![]() | ScaleFactor | |
![]() | Subtract(Vector2D) |
Subracts a vector from the current one.
|
![]() ![]() | Subtraction(Vector2D, Vector2D) |
Subracts two vectors from each other.
|
![]() | ToString()()() |
Converts the vector to an easy to read string.
(Overrides Object.ToString()()().) |
![]() | Translate(Vector2D) | |
![]() ![]() | Translate(Vector2D, Vector2D) | |
![]() ![]() | UseCartCoordSystem | |
![]() ![]() | UseScaling | |
![]() | X |
Gets or sets the double point number for the X axis.
|
![]() | Y |
Gets or sets the double point number for the Y axis.
|

Object | |
![]() | Vector2D |