1
This commit is contained in:
parent
8b6410826d
commit
f32b842baf
@ -66,7 +66,7 @@ namespace a8
|
||||
y = v[1];
|
||||
}
|
||||
|
||||
float Vec2::CalcAngle(const Vec2& b)
|
||||
float Vec2::CalcAngle(const Vec2& b) const
|
||||
{
|
||||
float a1 = acos(Dot(b) / Norm() / b.Norm());
|
||||
bool at_right_side = Vec2::RIGHT.Dot(*this) > 0.0001f;
|
||||
@ -76,7 +76,7 @@ namespace a8
|
||||
return a1 / 3.1415926f;
|
||||
}
|
||||
|
||||
float Vec2::CalcAngleEx(const Vec2& b)
|
||||
float Vec2::CalcAngleEx(const Vec2& b) const
|
||||
{
|
||||
float a1 = acos(Dot(b) / Norm() / b.Norm());
|
||||
return a1 / 3.1415926f;
|
||||
|
@ -12,8 +12,8 @@ namespace a8
|
||||
|
||||
void Normalize();
|
||||
void Rotate(float angle);
|
||||
float CalcAngle(const Vec2& b);
|
||||
float CalcAngleEx(const Vec2& b);
|
||||
float CalcAngle(const Vec2& b) const;
|
||||
float CalcAngleEx(const Vec2& b) const;
|
||||
static Vec2 FromAngle(float angle);
|
||||
float Distance(const Vec2& b);
|
||||
float ManhattanDistance(const Vec2& b);
|
||||
|
Loading…
x
Reference in New Issue
Block a user