Parfis
v0.0.7
|
Struct that represents a 3d vector with components of type T. More...
#include <datastruct.h>
Public Member Functions | |
T | len () const |
Returns the vector length in Eucledian metric. More... | |
T | lenSq () const |
Returns the squared vector length in Eucledian metric. More... | |
Public Attributes | |
T | x |
Variable x. | |
T | y |
Variable y. | |
T | z |
Variable z. | |
Friends | |
bool | operator== (const Vec3D< T > &lhs, const Vec3D< T > &rhs) |
Compares if vectors are equal. | |
bool | operator!= (const Vec3D< T > &lhs, const Vec3D< T > &rhs) |
Compares if vectors are not equal. | |
std::ostream & | operator<< (std::ostream &os, const Vec3D< T > &vec) |
Oveload of std::out operator. More... | |
Struct that represents a 3d vector with components of type T.
The struct has three member variables x, y and z of type T.
|
inline |
Returns the vector length in Eucledian metric.
The length is calculated as \( \sqrt{x^2 + y^2 + z^2} \)
|
inline |
Returns the squared vector length in Eucledian metric.
The length is calculated as \( x^2 + y^2 + z^2 \)
|
friend |
Oveload of std::out operator.
os | Output stream |
vec | 3DVec to output |