1
This commit is contained in:
parent
eb75ae0110
commit
604d8d5bb1
@ -7,26 +7,29 @@
|
||||
|
||||
float Position::Distance2D(a8::Vec2 pos)
|
||||
{
|
||||
return 0;
|
||||
return pos.Distance(ToVec2());
|
||||
}
|
||||
|
||||
float Position::Distance2D2(const Position& pos)
|
||||
{
|
||||
return 0;
|
||||
return Distance2D(pos.ToVec2());
|
||||
}
|
||||
|
||||
float Position::ManhattanDistance2D(const Position& target_pos)
|
||||
{
|
||||
return 0;
|
||||
return ToVec2().ManhattanDistance(target_pos.ToVec2());
|
||||
}
|
||||
|
||||
a8::Vec2 Position::CalcDir2D(const Position& target_pos)
|
||||
{
|
||||
|
||||
return target_pos.ToVec2() - ToVec2();
|
||||
}
|
||||
|
||||
|
||||
a8::Vec2 Position::ToVec2() const
|
||||
{
|
||||
|
||||
a8::Vec2 v2;
|
||||
v2.x = x;
|
||||
v2.y = y;
|
||||
return v2;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user