Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Union() [1/2]

static Rectangle Microsoft.Xna.Framework.Rectangle.Union ( Rectangle value1,
Rectangle value2 )
inlinestatic

Definition at line 197 of file Rectangle.cs.

198 {
199 int num = value1.X + value1.Width;
200 int num2 = value2.X + value2.Width;
201 int num3 = value1.Y + value1.Height;
202 int num4 = value2.Y + value2.Height;
203 int num5 = ((value1.X < value2.X) ? value1.X : value2.X);
204 int num6 = ((value1.Y < value2.Y) ? value1.Y : value2.Y);
205 int num7 = ((num > num2) ? num : num2);
206 int num8 = ((num3 > num4) ? num3 : num4);
207 Rectangle result = default(Rectangle);
208 result.X = num5;
209 result.Y = num6;
210 result.Width = num7 - num5;
211 result.Height = num8 - num6;
212 return result;
213 }
Rectangle(int x, int y, int width, int height)
Definition Rectangle.cs:64

References Microsoft.Xna.Framework.Rectangle.Height, Microsoft.Xna.Framework.Rectangle.Width, Microsoft.Xna.Framework.Rectangle.X, and Microsoft.Xna.Framework.Rectangle.Y.

Referenced by Terraria.NPC.AI_AttemptToFindTeleportSpot(), Terraria.GameContent.Events.ScreenObstruction.Draw(), Terraria.GameContent.DoorOpeningHelper.GetPlayerInfoForOpeningDoor(), and Terraria.Wiring.TeleporterHitboxIntersects().