![]() |
Zivid C++ API 2.19.0+b5c53d0f-1
|
Vector with two coordinates as float. More...
#include <Zivid/Vector.h>
Public Types | |
| using | ValueType = float |
| The type of the coordinate values. | |
Public Member Functions | |
| VectorXY ()=default | |
| Constructor. | |
| constexpr | VectorXY (float xCoord, float yCoord) |
| Constructor. | |
| ZIVID_UTILS_EXPORT float | angleInDegrees () const |
| Get the direction of this vector as an angle in degrees, in the range [0, 360) | |
| ZIVID_UTILS_EXPORT float | angleInRadians () const |
| Get the direction of this vector as an angle in radians, in the range [0, 2*pi) | |
| ZIVID_UTILS_EXPORT std::string | toString () const |
| Get string representation. | |
| ZIVID_UTILS_EXPORT bool | operator== (const VectorXY &rhs) const |
| Check for equality. | |
| ZIVID_UTILS_EXPORT bool | operator!= (const VectorXY &rhs) const |
| Check for inequality. | |
Public Attributes | |
| ValueType | x |
| The x element of the vector. | |
| ValueType | y |
| The y element of the vector. | |
Vector with two coordinates as float.
| using Zivid::VectorXY::ValueType = float |
The type of the coordinate values.
|
default |
Constructor.
|
inlineconstexpr |
Constructor.
| ZIVID_UTILS_EXPORT float Zivid::VectorXY::angleInDegrees | ( | ) | const |
Get the direction of this vector as an angle in degrees, in the range [0, 360)
0 degrees points along the positive x-axis, and the angle increases towards the positive y-axis. Throws if the vector has zero length or is non-finite.
| ZIVID_UTILS_EXPORT float Zivid::VectorXY::angleInRadians | ( | ) | const |
Get the direction of this vector as an angle in radians, in the range [0, 2*pi)
0 radians points along the positive x-axis, and the angle increases towards the positive y-axis. Throws if the vector has zero length or is non-finite.
| ZIVID_UTILS_EXPORT bool Zivid::VectorXY::operator!= | ( | const VectorXY & | rhs | ) | const |
Check for inequality.
| ZIVID_UTILS_EXPORT bool Zivid::VectorXY::operator== | ( | const VectorXY & | rhs | ) | const |
Check for equality.
| ZIVID_UTILS_EXPORT std::string Zivid::VectorXY::toString | ( | ) | const |
Get string representation.
| ValueType Zivid::VectorXY::x |
The x element of the vector.
| ValueType Zivid::VectorXY::y |
The y element of the vector.