![]() |
NumCpp
2.16.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
|
Holds a 3D vector. More...
#include <Vec3.hpp>
Static Public Member Functions | |
| static constexpr Vec3 | back () noexcept |
| static constexpr Vec3 | down () noexcept |
| static constexpr Vec3 | forward () noexcept |
| static constexpr Vec3 | left () noexcept |
| static constexpr Vec3 | right () noexcept |
| static constexpr Vec3 | up () noexcept |
Data Fields | |
| double | x { 0. } |
| double | y { 0. } |
| double | z { 0. } |
Holds a 3D vector.
|
constexprdefault |
Default Constructor
Constructor
| inX | the x component |
| inY | the y component |
| inZ | the y component |
Constructor
| inList |
Constructor
| vec2 | 2d vector |
Returns the angle between the two vectors
| otherVec |
Returns the unit vector [0, 0, -1]
Returns a copy of the vector with its magnitude clamped to maxLength
| maxLength |
Returns the cross product of the two vectors
| otherVec |
Returns the distance between the two vectors
| otherVec |
Returns the dot product of the two vectors
| otherVec |
Returns the unit vector [0, -1, 0]
Returns the unit vector [0, 0, 1]
Returns the unit vector [-1, 0, 0]
Linearly interpolates between two vectors
| otherVec | |
| t | the amount to interpolate by (clamped from [0, 1]); |
|
inlinenoexcept |
Returns the magnitude of the vector
Not Equality operator
| rhs |
Equality operator
| rhs |
Returns the unit vector [1, 0, 0]
|
inline |
Returns the Vec3 as a string
Returns the unit vector [0, 1, 0]
| double nc::Vec3::x { 0. } |
| double nc::Vec3::y { 0. } |
| double nc::Vec3::z { 0. } |