|
Yasiu Math 1
Collection of mathematic functions that help create game mechanics and procedural tools
|
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> | |
| 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. | |
Functions that calculate trigonometry problems.
| 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)} \]
| T |
| alfa | |
| beta | |
| symmetricWidth |
| 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)} \]
| T |
| alfa | angle of first point |
| beta | angle of second point |
| widthA | distance for first point |
| widthB | distance for second point |
Only place when they don't meet in infinite space
| 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
| T |
| angle | |
| radius | |
| spreadDistance |
| 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
| T |
| X | |
| Y | |
| spreadDistance |