Click or drag to resize
Vector Methods

The Vector type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAdd

Helper function that adds the components values of a point to an existing vector and returns the result as a new Point.

Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetUnitVector

Used to get the unit vector for the current vector. The unit vector should have no component greater than 1.

Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRotate

Rotates a vector about the origin by an angle given in Radians radians.

A point (x,y) can be rotated around the origin (0,0) by running it through the following equations to get the new point (x',y'): x' = cos(theta)*x - sin(theta)*y y' = sin(theta)*x + cos(theta)*y where theta is the angle by which to rotate the point.

Public methodScale

Scales a vector by a constant value and returns a new vector.

Public methodStatic memberSubtract

Helper function that subtracts two points and computes the resulting vector.

Public methodStatic memberToDegrees

Helper function used to convert radians to degrees.

Public methodStatic memberToRadians

Helper function used to convert degrees to radians.

Public methodToString

Converts the given vector into a textual representation useful for debugging purposes.

(Overrides ObjectToString.)
Top
See Also