Skip to content

Commit c6c0979

Browse files
authored
Quick fix to use units::abs
1 parent 9424cf5 commit c6c0979

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/units/Vector2D.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#pragma once
22

3+
#include "units/units.hpp"
34
#include "units/Angle.hpp"
45

56
namespace units {
@@ -42,7 +43,7 @@ template <isQuantity T> class Vector2D {
4243
* @param m magnitude
4344
*/
4445
static Vector2D fromPolar(Angle t, T m) {
45-
m = m.abs();
46+
m = abs(m);
4647
t = constrainAngle360(t);
4748
return Vector2D<T>(m * cos(t), m * sin(t));
4849
}
@@ -324,4 +325,4 @@ typedef Vector2D<Length> V2Position;
324325
typedef Vector2D<LinearVelocity> V2Velocity;
325326
typedef Vector2D<LinearAcceleration> V2Acceleration;
326327
typedef Vector2D<Force> V2Force;
327-
} // namespace units
328+
} // namespace units

0 commit comments

Comments
 (0)