Skip to content

Commit 0d8b23f

Browse files
committed
OOBState: Migrate remaining weak functions
1 parent 296fdcd commit 0d8b23f

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

src/SB/Core/x/xMath2.h

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,22 @@ struct xVec2
5555
xVec2& assign(F32 x, F32 y);
5656
F32 length() const;
5757
F32 length2() const;
58-
xVec2 normal() const;
59-
xVec2& normalize();
60-
F32 dot(const xVec2&) const;
58+
xVec2 normal() const
59+
{
60+
xVec2 tmp = *this;
61+
return tmp.normalize();
62+
}
63+
64+
xVec2& normalize()
65+
{
66+
*this /= length();
67+
return *this;
68+
}
69+
70+
F32 dot(const xVec2& b) const
71+
{
72+
return (x * b.x) + (y * b.y);
73+
}
6174

6275
xVec2& operator=(F32);
6376
xVec2 operator*(F32) const;

src/SB/Game/zEntPlayerOOBState.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,14 +1269,3 @@ namespace oob_state
12691269
}
12701270
} // namespace
12711271
} // namespace oob_state
1272-
1273-
WEAK F32 xVec2::dot(const xVec2& b) const
1274-
{
1275-
return (x * b.x) + (y * b.y);
1276-
}
1277-
1278-
WEAK xVec2& xVec2::normalize()
1279-
{
1280-
*this /= length();
1281-
return *this;
1282-
}

0 commit comments

Comments
 (0)