This is a class defined under pum namespace.
For detailed documentation of the vector2d
class, including methods and usage examples, please refer to the following file:
- Operations for 2D vector math including addition, subtraction, scalar multiplication, division, and comparison.
- Functions for calculating the length, normalizing, and changing the length of vectors.
- Utility methods like
dotpro
,crosspro
, and more.
Refer to the code and examples in the documentation for a complete guide on how to use the vector2d
class and associated functions.
long double dotpro(vector2d a, vector2d b)
long double crosspro(vector2d a, vector2d b)
template<typename T> bool nearlyequal(T a, T b, long double thr)
bool nearlyequal(vector2d a, vector2d b, long double thr)
std::pair<long double, long double> projectcircle(pum::vector2d line, pum::vector2d point, double radius)
std::pair<double, double> projectpolygon(pum::vector2d line, std::vector<pum::vector2d>& points)
pointlineprojectresult distanceFromLinesegment(pum::vector2d a, pum::vector2d b, pum::vector2d p)
long double deg2rad(long double deg)
long double rad2deg(long double rad)
You can find detailed documentation for other functions here