@@ -223,7 +223,7 @@ namespace RTE {
223
223
// / Returns a copy of this Vector, rotated relatively by an angle in radians.
224
224
// / @param angle The angle in radians to rotate by. Positive angles rotate counter-clockwise, and negative angles clockwise.
225
225
// / @return A rotated copy of this Vector.
226
- inline Vector GetRadRotatedCopy (const float angle) {
226
+ inline Vector GetRadRotatedCopy (const float angle) const {
227
227
Vector returnVector = *this ;
228
228
const float adjustedAngle = -angle;
229
229
returnVector.m_X = m_X * std::cos (adjustedAngle) - m_Y * std::sin (adjustedAngle);
@@ -242,7 +242,7 @@ namespace RTE {
242
242
// / Returns a copy of this Vector, rotated relatively by an angle in degrees.
243
243
// / @param angle The angle in degrees to rotate by. Positive angles rotate counter-clockwise, and negative angles clockwise.
244
244
// / @return A rotated copy of this Vector.
245
- inline Vector GetDegRotatedCopy (const float angle) { return GetRadRotatedCopy (angle * c_PI / 180 .0F ); };
245
+ inline Vector GetDegRotatedCopy (const float angle) const { return GetRadRotatedCopy (angle * c_PI / 180 .0F ); };
246
246
247
247
// / Rotate this Vector relatively by an angle in degrees.
248
248
// / @param angle The angle in degrees to rotate by. Positive angles rotate counter-clockwise, and negative angles clockwise.
@@ -360,7 +360,7 @@ namespace RTE {
360
360
361
361
// / Unary negation overload for single Vectors.
362
362
// / @return The resulting Vector.
363
- inline Vector operator -() { return Vector (-m_X, -m_Y); }
363
+ inline Vector operator -() const { return Vector (-m_X, -m_Y); }
364
364
365
365
// / An equality operator for testing if any two Vectors are equal.
366
366
// / @param lhs A Vector reference as the left hand side operand.
0 commit comments