Пример #1
0
        public Position2 GetInverted()
        {
            Position2 result = new Position2(this);

            result.Invert();
            return(result);
        }
Пример #2
0
        public Position2 DifferenceWith(Position2 position)
        {
            Position2 result = new Position2();

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