Implementation of scalar vector
More...
Inherits IMyList.
Inherited by TVector2D, and TVector3D.
Implementation of scalar vector
Constructor
- Parameters
-
_Components | Initial values of vector components |
void AddScalar |
( |
double |
value | ) |
|
Add scalar value to each component of the vector
- Parameters
-
value | Scalar value to be added to each component of the vector |
Add the vector. Each component of the result is sum of components of current and new vector
- Parameters
-
Return deep clone of the vector
- Returns
- Deep clone of the vector
Boolean CompareVector |
( |
TVector |
vector | ) |
|
Compare given vector and vector passed as a parameter
- Parameters
-
- Returns
- TRUE, if vectors are the same. Otherwise FALSE
Cross production of current vector and vector passed as a parameter
- Parameters
-
vector | Second vector of cross production |
- Returns
- Cross production of the current vector and parameter
void DivideByScalar |
( |
double |
value | ) |
|
Divide each component of the vector by the scalar value
- Parameters
-
double DotProduct |
( |
TVector |
vector | ) |
|
Dot product of current vector and vector passed as a parameter
- Parameters
-
vector | Vector used in dot production |
- Returns
- Dot production of the current vector and parameter
double GetComponent |
( |
double |
index | ) |
|
Return value of the component on the position given by index
- Parameters
-
index | Position of desired component |
- Returns
- Value of component on the position given by index
List<double> GetComponents |
( |
| ) |
|
Return values of the vector components
- Returns
- List of vector values
void InsertComponent |
( |
double |
value | ) |
|
Insert new value at the end of the vector. This command will change the size of the vector.
- Parameters
-
value | Value of the new component |
void InsertComponentOnPos |
( |
double |
index, |
|
|
double |
value |
|
) |
| |
Insert new component on the position given by index.
- Parameters
-
index | Position on which the new component will be inserted |
value | Value of the new component |
void MultipleByScalar |
( |
double |
value | ) |
|
Multiply each component of the vector by the scalar value
- Parameters
-
Return vector with normalized length = 1
- Returns
- Normalized vector with length = 1
void SubstractVector |
( |
TVector |
vector | ) |
|
Subtract given vector from current one
- Parameters
-
vector | Vector to be subtracted |
void SubtractScalar |
( |
double |
value | ) |
|
Subtract given scalar from each component of the vector
- Parameters
-
value | Value to be subtracted |
Return value of vector component
- Parameters
-
index | Index of the component |
- Returns
- Value of the component at the positition given by Index