Vector Methods |
The Vector type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() | Add | Helper function that adds the components values of a point to an existing vector and returns the result as a new Point. |
![]() | Equals | (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | GetUnitVector | Used to get the unit vector for the current vector. The unit vector should have no component greater than 1. |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | Rotate | 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. |
![]() | Scale | Scales a vector by a constant value and returns a new vector. |
![]() ![]() | Subtract | Helper function that subtracts two points and computes the resulting vector. |
![]() ![]() | ToDegrees | Helper function used to convert radians to degrees. |
![]() ![]() | ToRadians | Helper function used to convert degrees to radians. |
![]() | ToString | Converts the given vector into a textual representation useful for debugging purposes. |