Yasiu Math 1
Collection of mathematic functions that help create game mechanics and procedural tools
Loading...
Searching...
No Matches
YasiuMathLib.h File Reference
#include <vector>
#include <cassert>
#include <cmath>
#include <algorithm>
#include <unordered_set>
#include "YasiuConstants.h"

Go to the source code of this file.

Classes

struct  YasiuMath::Point< T >
 Helper object, for point description in algorithm. More...
struct  YasiuMath::IndexedPair< U, T >
 Helper object, for point description in algorithm. More...
struct  YasiuMath::PointAngle< T >
 Object 'point' that has its angle related to center. Helper object, for point description in algorithm. More...

Namespaces

namespace  YasiuMath::AngleUtils
 Collection of functions working with angles and rotation.
namespace  YasiuMath::Trigonometry
 Functions that calculate trigonometry problems in 2D / 3D space.
namespace  YasiuMath::ConvexHull
 Collection of convex hull functions and helper functions.

Functions

template<typename T>
static T YasiuMath::AngleUtils::NormalizeAngleToPeriod (T angle, T period=360.f)
 Normalize angle by removing full periods from value, result is in range <0, period>.
template<typename T>
std::vector< std::pair< T, T > > YasiuMath::Trigonometry::SpreadPointsOnTangentByAngleRadius (const T angle, const T radius, const T spreadDistance)
template<typename T>
std::vector< std::pair< T, T > > YasiuMath::Trigonometry::SpreadPointsOnTangentByXY (const T X, const T Y, const T spreadDistance)
 Spread points on tangent line to arc.
template<typename T>
YasiuMath::Trigonometry::FindMinimalRadiusForIntersectingTangentsOnArc (const T alfa, const T beta, const T symmetricWidth)
 Finds radius of circle for both tangent line that intersect.
template<typename T>
std::pair< T, T > YasiuMath::Trigonometry::FindMinimalRadiusForIntersectingTangentsOnArcAsymmetric (const T alfa, const T beta, const T widthA, const T widthB)
 Finds radius of 2 circles for both tangent line that intersect. Tangents on circle are defined by angle Alfa and Beta. Where point with angle 0 is has value \(\{X, 0\}\) and goes counter-clockwise.
template<typename T>
static std::vector< int > YasiuMath::ConvexHull::ConvexHull2D (const std::vector< std::pair< T, T > > &polygonPoints)
 Find Convex Hull in 2D space from given points.