Rect.PointToNormalized(Rect rectangle, Vector2 point)
Returns the normalized coordinates cooresponding the the point.
Parameters:
Name | Type | Description |
---|---|---|
rectangle | Rect | Rectangle to get normalized coordinates inside. |
point | Vector2 | A point inside the rectangle to get normalized coordinates for. |
Returns:
type | Description |
---|---|
Vector2 | normalized coordinates cooresponding the the point. |
Usage
---@type Rect
local rectangle;
---@type Vector2
local point;
local val0 = Rect:PointToNormalized(rectangle, point)