Beispiel #1
0
 public bool IsParallelTo(IntVector vector) => this.ToVector2().IsParallelTo(vector.ToVector2());
Beispiel #2
0
 public float DistanceSquared(IntVector dest) => (dest - this).ToVector2().LengthSquared();
Beispiel #3
0
        public IntVector Direction8(IntVector dest)
        {
            var dir = Direction(dest).Rounded();

            return(new IntVector((int)dir.X, (int)dir.Y));
        }
Beispiel #4
0
 public float Distance(IntVector dest) => (dest - this).ToVector2().Length();
Beispiel #5
0
 public Vector2 Direction(IntVector dest) => Vector2.Normalize((dest - this).ToVector2()).Round(2);