Show / Hide Table of Contents

Class RectUtilities

Contains some utility functions related to rects

Inheritance
object
RectUtilities
Namespace: WeaverCore.Utilities
Assembly: WeaverCore.dll
Syntax
public static class RectUtilities

Methods

| Edit this page View Source

ClampWithin(Rect, Vector2)

Clamps a point within a rect

Declaration
public static Vector2 ClampWithin(this Rect rect, Vector2 point)
Parameters
Type Name Description
Rect rect

The rect to clamp the point within

Vector2 point

The point to clamp

Returns
Type Description
Vector2

Returns the point clamped within the rect

| Edit this page View Source

RandomPointWithin(Rect)

Gets a random point within a rect

Declaration
public static Vector2 RandomPointWithin(this Rect rect)
Parameters
Type Name Description
Rect rect

The rect to get a random point within

Returns
Type Description
Vector2

Returns a random point within the rect

  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾