PLaSK library
|
Generic template for 2D and 3D vectors. More...
#include <plask/vector/common.hpp>
Related Symbols | |
(Note that these are not member symbols.) | |
template<int dim, typename T > | |
double | abs2 (const Vec< dim, T > &v) |
Calculate square of vector magnitude. | |
template<int dim, typename T , typename OtherT > | |
constexpr auto | operator* (const OtherT &scale, const Vec< dim, T > &v) -> decltype(v *scale) |
Multiply vector v by scalar scale . | |
template<int dim, typename T > | |
#define | abs(x) ((x) >= 0 ? (x) : -(x)) |
Calculate vector magnitude. | |
template<int dim, typename T > | |
bool | isnan (const Vec< dim, T > &v) |
Check if any vector componen is not-a-number. | |
template<int dst_dim, typename T , int src_dim> | |
Vec< dst_dim, T > | vec (const Vec< src_dim, T > &src) |
Convert vector between space. | |
template<typename T > | |
Vec< 3, T > | vec (const Vec< 2, T > &src, T lon) |
Convert vector 2D to 3D space. | |
Vec< 2, double > | rotateToLonTranAbs (const Vec< 3, double > &v) |
Rotate v over up axis to lie on tran-vert plane. | |
Vec< 2, double > | rotateToLonTranSgn (const Vec< 3, double > &v) |
Rotate v over up axis to lie on tran-vert plane. | |
template<typename T > | |
Vec< 3, T > | vec3Dplus2D (const Vec< 3, T > &v3, const Vec< 2, T > &v2, T lon) |
Calculate v3 + v2 with given lon coordinate. | |
template<typename T > | |
Vec< 3, T > | vec3Dplus2D (const Vec< 3, T > &v3, const Vec< 2, T > &v2) |
Calculate v3 + v2 , same as vec3Dplus2D(v3, v2, 0.0). | |
template<typename T , typename OtherT > | |
constexpr auto | operator* (const OtherT &scale, const LateralVec< T > &v) -> decltype(v *scale) |
Multiply vector v by scalar scale . | |
Generic template for 2D and 3D vectors.
Definition at line 26 of file common.hpp.
|
related |
Multiply vector v
by scalar scale
.
scale | scalar |
v | vector |
v
multiplied by scalar
Definition at line 362 of file lateral.hpp.