File tree Expand file tree Collapse file tree 2 files changed +16
-14
lines changed
Expand file tree Collapse file tree 2 files changed +16
-14
lines changed Original file line number Diff line number Diff 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 ;
Original file line number Diff line number Diff 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- }
You can’t perform that action at this time.
0 commit comments