Skip to content

RectExtensions

Namespace: SideXP.Core

public static class RectExtensions

Extension functions for Rect values.

Methods

HoldInArea(Rect, Rect)

public static void HoldInArea(ref Rect rect, Rect area)

Holds this Rect inside the given area.

Parameters

  • rect: The Rect you want to hold in the given area.
  • area: The available area in which the given rect can be placed.

HoldInScreenSpace(Rect)

public static void HoldInScreenSpace(ref Rect rect)

Holds this Rect inside the screen space.

Parameters

  • rect: The Rect you want to hold in the screen space.