Exemplo n.º 1
0
        public Position2 GetInverted()
        {
            Position2 result = new Position2(this);

            result.Invert();
            return(result);
        }
Exemplo n.º 2
0
        public Position2 DifferenceWith(Position2 position)
        {
            Position2 result = new Position2();

            result.SetDifferenceOf(this, position);
            return(result);
        }
Exemplo n.º 3
0
 public void SetDifferenceOf(Position2 position, Position2 subtrahend)
 {
     this.Point = subtrahend.Angle.TurnBackward(position.Point - subtrahend.Point);
     this.Angle = position.Angle - subtrahend.Angle;
 }
Exemplo n.º 4
0
 public Position2 CombineWith(Position2 position)
 {
     return(new Position2(this, position));
 }
Exemplo n.º 5
0
 public void SetCombinationOf(Position2 first, Position2 second)
 {
     this.Point = first.Point + first.Angle.Turn(second.Point);
     this.Angle = first.Angle + second.Angle;
 }
Exemplo n.º 6
0
 public void SetPosition(Position2 position)
 {
     this.Point = position.Point;
     this.Angle = position.Angle;
 }
Exemplo n.º 7
0
 public Position2(Position2 first, Position2 second)
 {
     this.Point = first.Point + first.Angle.Turn(second.Point);
     this.Angle = first.Angle + second.Angle;
 }
Exemplo n.º 8
0
 public Position2(Position2 position)
 {
     this.Point = position.Point;
     this.Angle = position.Angle;
 }
Exemplo n.º 9
0
 public Vector2 ChangePositioningFrom(Position2 position, Vector2 vector)
 {
     return(this.Angle.TurnBackward(position.Angle.Turn(vector) + position.Point - this.Point));
 }
Exemplo n.º 10
0
 public Vector2 ChangePositioningTo(Position2 position, Vector2 vector)
 {
     return(position.Angle.TurnBackward(this.Angle.Turn(vector) + this.Point - position.Point));
 }