s&
About
The Project
infoAbout s&box mapRoadmap monitoringMetricsEngine startup and usage numbers
Updates
newspaperLatest News
jams
Workshop
Steam
open_in_newSteam Workshop
Assets
view_in_arModels textureMaterials apparelClothing
Forum
Learn
Documentation
rocket_launchGetting Started docsDocumentation apiAPI Reference
Resources
schoolTutorials manage_searchCode Search
Get s&box
Sign in with Steam
Api
Common Structs
Rect
FromPoints
chevron_left Common Structs
struct
Rect

Constructors

functionsRect

Properties

data_objectBottomdata_objectBottomLeftdata_objectBottomRightdata_objectCenterdata_objectHeightdata_objectLeftdata_objectPositiondata_objectRightdata_objectSizedata_objectTopdata_objectTopLeftdata_objectTopRightdata_objectWidthdata_objectWithoutPosition

Methods

functionsAddfunctionsAddPointfunctionsAlignfunctionsCeilingfunctionsClosestPointfunctionsContainfunctionsFloorfunctionsGrowfunctionsIsInsidefunctionsOverlapsfunctionsRoundfunctionsShrinkfunctionsSnapToGridfunctionsToVector4

Static Methods

functionsFromPointsfunctionsIntersect
FromPoints
Create a rect between two points. The order of the points doesn't matter.
methodstatic
static Rect FromPoints (in Vector2 a, in Vector2 b)

Parameters

NameTypeDescription
in a Vector2
in b Vector2

Returns

TypeDescription
Rect
Declared in Sandbox.Rect ยท Assembly Sandbox.System
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.
Facepunch
  • News
  • Docs
  • Metrics
  • FAQ
  • Forum
  • Discord
  • Twitter