public Position2 GetInverted() { Position2 result = new Position2(this); result.Invert(); return(result); }
public Position2 DifferenceWith(Position2 position) { Position2 result = new Position2(); result.SetDifferenceOf(this, position); return(result); }
public void SetDifferenceOf(Position2 position, Position2 subtrahend) { this.Point = subtrahend.Angle.TurnBackward(position.Point - subtrahend.Point); this.Angle = position.Angle - subtrahend.Angle; }
public Position2 CombineWith(Position2 position) { return(new Position2(this, position)); }
public void SetCombinationOf(Position2 first, Position2 second) { this.Point = first.Point + first.Angle.Turn(second.Point); this.Angle = first.Angle + second.Angle; }
public void SetPosition(Position2 position) { this.Point = position.Point; this.Angle = position.Angle; }
public Position2(Position2 first, Position2 second) { this.Point = first.Point + first.Angle.Turn(second.Point); this.Angle = first.Angle + second.Angle; }
public Position2(Position2 position) { this.Point = position.Point; this.Angle = position.Angle; }
public Vector2 ChangePositioningFrom(Position2 position, Vector2 vector) { return(this.Angle.TurnBackward(position.Angle.Turn(vector) + position.Point - this.Point)); }
public Vector2 ChangePositioningTo(Position2 position, Vector2 vector) { return(position.Angle.TurnBackward(this.Angle.Turn(vector) + this.Point - position.Point)); }