Skip to main content

Rect.PointToNormalized(Rect rectangle, Vector2 point)

Returns the normalized coordinates cooresponding the the point.

Parameters:

NameTypeDescription
rectangleRectRectangle to get normalized coordinates inside.
pointVector2A point inside the rectangle to get normalized coordinates for.

Returns:

typeDescription
Vector2normalized coordinates cooresponding the the point.

Usage

---@type Rect
local rectangle;

---@type Vector2
local point;


local val0 = Rect:PointToNormalized(rectangle, point)