@@ -217,19 +217,33 @@ namespace RTE {
217
217
// / <returns>The absolute angle in degrees, in the interval [-90, 270).</returns>
218
218
float GetAbsDegAngle () const { return GetAbsRadAngle () / c_PI * 180 .0F ; }
219
219
220
+ // / <summary>
221
+ // / Returns a Vector rotated relatively by an angle in radians.
222
+ // / </summary>
223
+ // / <param name="angle">The angle in radians to rotate by. Positive angles rotate counter-clockwise, and negative angles clockwise.</param>
224
+ // / <returns>a Vector rotated relatively to this Vector .</returns>
225
+ Vector GetRadRotated (const float angle);
226
+
220
227
// / <summary>
221
228
// / Rotate this Vector relatively by an angle in radians.
222
229
// / </summary>
223
230
// / <param name="angle">The angle in radians to rotate by. Positive angles rotate counter-clockwise, and negative angles clockwise.</param>
224
231
// / <returns>Vector reference to this after the operation.</returns>
225
- Vector & RadRotate (const float angle);
232
+ Vector & RadRotate (const float angle) { *this = GetRadRotated (angle); return *this ; }
233
+
234
+ // / <summary>
235
+ // / Returns a Vector rotated relatively by an angle in degrees.
236
+ // / </summary>
237
+ // / <param name="angle">The angle in degrees to rotate by. Positive angles rotate counter-clockwise, and negative angles clockwise.</param>
238
+ // / <returns>a Vector rotated relatively to this Vector .</returns>
239
+ Vector GetDegRotated (const float angle) { return GetRadRotated (angle * c_PI / 180 .0F ); };
226
240
227
241
// / <summary>
228
242
// / Rotate this Vector relatively by an angle in degrees.
229
243
// / </summary>
230
244
// / <param name="angle">The angle in degrees to rotate by. Positive angles rotate counter-clockwise, and negative angles clockwise.</param>
231
245
// / <returns>Vector reference to this after the operation.</returns>
232
- Vector & DegRotate (const float angle) { return RadRotate (angle * c_PI / 180 . 0F ) ; }
246
+ Vector & DegRotate (const float angle) { * this = GetDegRotated (angle); return * this ; }
233
247
234
248
// / <summary>
235
249
// / Set this Vector to an absolute rotation based on the absolute rotation of another Vector.
0 commit comments