Yasiu Math 1
Collection of mathematic functions that help create game mechanics and procedural tools
Loading...
Searching...
No Matches
YasiuMath::Trigonometry Namespace Reference

Functions that calculate trigonometry problems. More...

Functions

template<typename T>
std::vector< std::pair< T, T > > SpreadPointsOnTangentByAngleRadius (const T angle, const T radius, const T spreadDistance)
template<typename T>
std::vector< std::pair< T, T > > SpreadPointsOnTangentByXY (const T X, const T Y, const T spreadDistance)
template<typename T>
FindMinimalRadiusForIntersectingTangentsOnArc (const T alfa, const T beta, const T symmetricWidth)
 Finds radius of circle 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>
std::pair< T, T > 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.

Detailed Description

Functions that calculate trigonometry problems.

Function Documentation

◆ FindMinimalRadiusForIntersectingTangentsOnArc()

template<typename T>
T YasiuMath::Trigonometry::FindMinimalRadiusForIntersectingTangentsOnArc ( const T alfa,
const T beta,
const T symmetricWidth )

Finds radius of circle 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.

Tangent line distance to meeting point from circle intersection is symmetricWidth.

Angle is in radians.

\[R=\frac{\sin(\alpha)*A-\sin(\beta)*B}{\cos(\beta)-\cos(\alpha)} \]

Template Parameters
T
Parameters
alfa
beta
symmetricWidth
Returns

◆ FindMinimalRadiusForIntersectingTangentsOnArcAsymmetric()

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.

Tangent line distance to meeting point from circle intersection is symmetricWidth.

Angle is in radians.

\[R=\frac{\sin(\alpha)*A-\sin(\beta)*B}{\cos(\beta)-\cos(\alpha)} \]

Template Parameters
T
Parameters
alfaangle of first point
betaangle of second point
widthAdistance for first point
widthBdistance for second point
Returns
Pair of distances

Only place when they don't meet in infinite space

◆ SpreadPointsOnTangentByAngleRadius()

template<typename T>
std::vector< std::pair< T, T > > YasiuMath::Trigonometry::SpreadPointsOnTangentByAngleRadius ( const T angle,
const T radius,
const T spreadDistance )

Spread points on tangent line to arc located by angle and radius of given arc. Points are moved away from tangent point by spreadDistance

Template Parameters
T
Parameters
angle
radius
spreadDistance
Returns

◆ SpreadPointsOnTangentByXY()

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. XY is tangent point location, and arc center is 0,0. Points are moved away from tangent point by spreadDistance

Template Parameters
T
Parameters
X
Y
spreadDistance
Returns