| 11 | namespace TEN::Math::Geometry |
| 12 | { |
| 13 | Vector2 TranslatePoint(const Vector2& point, short orient, const Vector2& relOffset) |
| 14 | { |
| 15 | float sinOrient = sin(TO_RAD(orient)); |
| 16 | float cosOrient = cos(TO_RAD(orient)); |
| 17 | |
| 18 | auto offset = Vector2( |
| 19 | (cosOrient * relOffset.x) - (sinOrient * relOffset.y), |
| 20 | (sinOrient * relOffset.x) + (cosOrient * relOffset.y)); |
| 21 | |
| 22 | return (point + offset); |
| 23 | } |
| 24 | |
| 25 | Vector2 TranslatePoint(const Vector2& point, short orient, float dist) |
| 26 | { |