20 lines
424 B
C#
20 lines
424 B
C#
|
namespace ProjectAntiAircraftGun
|
|||
|
{
|
|||
|
public class Vector2
|
|||
|
{
|
|||
|
public float x, y;
|
|||
|
public float lenght => MathF.Sqrt(x * x + y * y);
|
|||
|
public Vector2 normilized => new Vector2(x/lenght, y/lenght);
|
|||
|
public Vector2(float x, float y)
|
|||
|
{
|
|||
|
this.x = x;
|
|||
|
this.y = y;
|
|||
|
}
|
|||
|
public Vector2()
|
|||
|
{
|
|||
|
x = 0;
|
|||
|
y = 0;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|